backup-restore

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.

Note: You can create volume-only backups and snapshots of the Cloud Pak for Data instance namespace (${PROJECT_CPD_INST_OPERANDS}), and not of other Cloud Pak for Data namespaces. For example, the namespace where the operators of the Cloud Pak for Data instance are installed ${PROJECT_CPD_INST_OPERATORS}.

Prerequisites

  1. Before you run any cpd-cli commands, download the cpd-cli 14.1.3 command-line utility for your operating system and IBM® Software Hub edition. For more information, see Installing the IBM Software Hub command-line interface (cpd-cli).
  2. The Red Hat OpenShift client oc is included in the PATH and has access to the Cloud Pak for Data cluster.
  3. Set up a shared volume PVC to be created and bounded for use in the initialization command. You can create a PVC from a PV or from a storage class. Ensure that the PV is a shared volume with the ReadWriteMany access mode.

    For more information, see Preparing the Cloud Pak for Data volume backup and restore utility.

  4. Set up a Kubernetes secret that is named cpdbr-repo-secret for initializing the utility.

    For more information, see Preparing the Cloud Pak for Data volume backup and restore utility.

  5. Confirm other prerequisites for snapshot-related commands.
  6. When Cloud Pak for Data is installed on NFS, the NFS storage must be configured with no_root_squash for volume-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