backup-restore
Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.7 reaches end of support. For more information, see Upgrading IBM Software Hub in the IBM Software Hub Version 5.1 documentation.
Back up and restore the Cloud Pak for Data
software on your Red Hat® OpenShift® Container Platform cluster with
the cpd-cli
backup-restore commands.
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, pods cannot reference PVCs. The utility scales down deployments and StatefulSets with PVCs during a restore from snapshot. Any jobs that reference PVCs must be manually cleaned up before 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 it runs 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 re-creates
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, if the same Kubernetes objects still exist. Your service might need to
provide scripts to handle backup and restore scenarios that are applicable to your service.
Prerequisites
- Before you run any
cpd-clicommands, ensure that you downloaded thecpd-cli13.0.4 command-line utility for your operating system and Cloud Pak for Data edition. For more information, see Installing the Cloud Pak for Data command-line interface (cpd-cli). - The Red Hat OpenShift client oc is included in the PATH and has access to the Cloud Pak for Data cluster.
- Set up a shared volume PVC or PV.
- Set up a Kubernetes secret for repository 1 oc 3.11+.
- Confirm other 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_squashforvolume-backupwith 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. |