Backing up CDE service using the docker image
You must run the docker image to take backup of a Cloudera Data Engineering (CDE) service. It takes backup of all the active virtual clusters in that CDE service. You can take backup of only an active CDE service.
Run the dex-upgrade-utils docker image on the host machine:
$ export BACKUP_OUTPUT_DIR=/home/dex/backup
$ docker run \
-v <kubeconfig_file_path>:/home/dex/.kube/config:ro \
-v <cdp_credential_file_path>:/home/dex/.cdp/credentials:ro \
-v <cde-upgrade-util.properties_file_path>:/opt/cde-backup-restore/scripts/backup-restore/cde-upgrade-util.properties:ro \
-v <local_backup_directory>:$BACKUP_OUTPUT_DIR \
-e KUBECONFIG=/home/dex/.kube/config \
<docker_image_name>:<docker_image_version> prepare-for-upgrade -s <cde-cluster-id> -o $BACKUP_OUTPUT_DIR
Example:
$ docker run \
-v $BASE_WORK_DIR/secrets/kubeconfig:/home/dex/.kube/config:ro \
-v $BASE_WORK_DIR/secrets/credentials:/home/dex/.cdp/credentials:ro \
-v $BASE_WORK_DIR/cde-upgrade-util.properties:/opt/cde-backup-restore/scripts/backup-restore/cde-upgrade-util.properties:ro \
-v $BASE_WORK_DIR/backup:$BACKUP_OUTPUT_DIR \
-e KUBECONFIG=/home/dex/.kube/config \
docker-private.infra.cloudera.com/cloudera/dex/dex-upgrade-utils:1.20.1 prepare-for-upgrade -s cluster-c2dhkp22 -o $BACKUP_OUTPUT_DIR