Using CDP CLI to back up Control Plane and restoring it

You can use CDP CLI commands to back up and restore Control Plane.

Ensure that the following prerequisites are complete:
  • You must have the PowerUser role.
  • For OCP, ensure that a VolumeSnapshotClass is installed with a CSI driver that matches the CSI driver for the storage class used.

To set up a CDP client to run the CDP CLI commands, see CDP Private Cloud CLI.

The following sample CDP CLI options show how to create a backup, restore or delete it, and monitor the progress of the events:
  1. Login to the CDP CLI setup.
  2. Create a backup of Control Plane using the create-backup CDP CLI option.
    The following sample snippet creates a backup named Backup 2.
    cdp.sh --form-factor private --endpoint-url https://cle-cp1.app.srd-os-01.kcloud.cloudera.com drscp create-backup --backup-name "Backup 2"
  3. Track the progress of the current status of the specified backupCrn (backup event) using the describe-backup CDP CLI option.
    The following sample snippet output shows the current status of the crn:altus:drs:us-west-1:18be-4c75-8c7f-f32e697dba4a:backup:91193c4f-45f0-949c-13e232f14c9e backupCrn.
    cdp.sh --no-verify-tls --endpoint-url https://cle-cdp.apps.drs3121-1.vpc.cloudera.com --no-verify-tls --form-factor private drscp describe-backup --backup-crn crn:altus:drs:us-west-1:18be-4c75-8c7f-f32e697dba4a:backup:91193c4f-45f0-949c-13e232f14c9e
  4. List all the backups using the list-backup CDP CLI option.
    The following sample snippet output lists all the available backups.
    cdp.sh --no-verify-tls --endpoint-url https://cle-cdp.apps.lh-lp1-1.vpc.cloudera.com --no-verify-tls --form-factor private drscp list-backup
  5. Restore a specific backup, using its CRN, with the restore-backup CDP CLI option.
    The following sample snippet restores the backup of crn:altus:drs:us-west-1:88d84e3c-4c3e-9903-6c388a689690:backup:aebe-96d7-b79d10b64183 CRN.
    cdp.sh --form-factor private --no-verify-tls --endpoint-url https://cle-ocp1123.apps.srd-os-01.kcloud.cloudera.com drscp restore-backup --backup-crn crn:altus:drs:us-west-1:88d84e3c-4c3e-9903-6c388a689690:backup:aebe-96d7-b79d10b64183
  6. Track the current status of the specified restoreCrn (restore event) using the describe-restore CDP CLI option.
    The following sample snippet output shows the current status of the crn:altus:drs:us-west-1:a70c917a-4be8-927c-d36f3f7db2de:restore:c3b34532-4391-b62d-3f471fae5a40 restoreCrn:
    cdp.sh --form-factor private --no-verify-tls --endpoint-url https://cle-cp1.apps.srd-os-01.kcloud.cloudera.com drscp describe-restore --restore-crn crn:altus:drs:us-west-1:a70c917a-4be8-927c-d36f3f7db2de:restore:c3b34532-4391-b62d-3f471fae5a40
Explore all the available CDP CLI options to backup and restore Control Plane and CDW in CDP CLI options for Control Plane namespaces and CDP CLI options for Cloudera Data Warehouse (CDW).