cpd-cli
backup-restore
backup-restore
is a plug-in to the IBM Cloud Pak® for Data command-line interface (cpd-cli
). Use the backup-restore
commands to
backup and restore the Cloud Pak for Data software on your
Red Hat®
OpenShift® Container Platform cluster.
Extended description
The backup-restore
command is a data
backup and restore utility for Cloud Pak for Data that can
be used as an augmentation or helper utility to the Cloud Pak for Data add-on services' backup and restore procedure.
- Portworx volumes
- Portworx snapshots are atomic, point-in-time snapshots. Snapshots can be taken while applications are running, and typically take less time to perform than copying files. During volume restoration, there can be no pods that reference PVCS. The utility will scale down deployments and StatefulSets with PVCS during a restore from snapshot. Any jobs that reference PVCS must be manually cleaned up prior to restore.
- Volumes for any storage class, offline volume backup and restore
- For data consistency, the utility quiesces services or scales down deployments and StatefulSets with PVCS before running backups or restores. A PersistentVolumeClaim or S3 compatible object storage can be used to store backups.
The backup-restore
command supports volume
backup and restore only; it does not provide application level backup and restore that recreates
Kubernetes resources (such as configmaps, secrets, PVCS, PVS, pods, deployments, and StatefulSets).
A typical use case is backing up and restoring all volumes in the same namespace, provided that the
same Kubernetes objects still exist. Your service might need to provide pre/post scripts to handle
backup and restore scenarios that are applicable to your service.
${PROJECT_CPD_INSTANCE}
), and not for Foundational or Cloud Pak for Data operators namespaces (for example, ${PROJECT_CPFS_OPS}
).Prerequisites
-
Before you run any
cpd-cli
commands, ensure that you downloaded thecpd-cli
12.0.6 command line utility for your operating system and Cloud Pak for Data edition from: https://github.com/IBM/cpd-cli/releases. - The Red Hat OpenShift client oc is included in the PATH and has access to the Cloud Pak for Data cluster.
- Setup a shared volume PVC/PV.
- Setup a Kubernetes secret for repository 1 oc 3.11+.
- Additional prerequisites for snapshot-related commands:
- Portworx 2.3.4+ (Enterprise)
- Stork 2.3.2+
- When Cloud Pak for Data is installed
on NFS, the NFS storage must be configured with
no_root_squash
forvolume-backup
with restic.
Required permissions
The backup-restore
command requires
cluster administrator or similar roles that are able to create, read, write, and delete access Stork
CRDs and the other Kubernetes resources (such as deployments, StatefulSets, cronjobs, jobs,
replicasets, configmaps, secrets, pods, namespaces, PVCS and PVS).
Commands
Command | Description |
---|---|
init |
Initialize the cpd-cli backup-restore command for backup and restore. |
quiesce |
Quiesce Kubernetes workloads such as deployments, StatefulSets, cronjobs, jobs, and pods. |
repository |
Work with the repository. |
repository list |
List repositories. |
repository validate |
Validate a repository. |
reset |
Reset the cpd-cli backup-restore command for backup and restore. |
snapshot |
Work with volume snapshots. |
snapshot create |
Create a volume snapshot. |
snapshot delete |
Delete a volume snapshot. |
snapshot list |
List volume snapshots. |
snapshot status |
Check volume snapshot status. |
snapshot-restore create |
Create a volume snapshot restore. |
snapshot-restore delete |
Delete a volume snapshot restore. |
snapshot-restore list |
List volume snapshot restores. |
snapshot-restore status |
Check the volume snapshot restore status. |
unquiesce |
Unquiesce Kubernetes workloads such as deployments, StatefulSets, cronjobs, jobs, and pods. |
version |
Display the backup-restore command version information. |
volume-backup |
Work with IBM Cloud Pak for Data volume backups. |
volume-backup create |
Create a backup of IBM Cloud Pak for Data volumes. |
volume-backup delete |
Delete a backup of IBM Cloud Pak for Data volumes. |
volume-backup download |
Download a IBM Cloud Pak for Data volume backup from a local provider. |
volume-backup list |
List IBM Cloud Pak for Data volume backups. |
volume-backup logs |
Retrieve IBM Cloud Pak for Data volume backups logs. |
volume-backup purge |
Purge IBM Cloud Pak for Data volume backups older than the specified retention time. |
volume-backup status |
Check the IBM Cloud Pak for Data volume backup status. |
volume-backup unlock |
Unlock a volume backup by removing the lock file. |
volume-backup upload |
Upload IBM Cloud Pak for Data volume backup data. |
volume-restore |
Work with IBM Cloud Pak for Data volume restores. |
volume-restore create |
Create a restore of IBM Cloud Pak for Data volumes. |
volume-restore delete |
Delete a restore of IBM Cloud Pak for Data volumes. |
volume-restore list |
List IBM Cloud Pak for Data volume restores. |
volume-restore logs |
Retrieve IBM Cloud Pak for Data volume restore logs. |
volume-restore status |
Check the IBM Cloud Pak for Data volume restore status. |