Rolling back the CDE service endpoint migration

You can use the rollback command to delete the new CDE service and restore the old CDE service in working condition.

To rollback, the state of the CDE service must be in the Failed or Installed state before you perform the rollback command.

  1. Set the following environment variables in case you have exited from the ECS Server host:
    export PATH=$PATH:/opt/cloudera/parcels/ECS/installer/install/bin/linux/:/opt/cloudera/parcels/ECS/docker
    export KUBECONFIG=~/kubeconfig
    export BASE_WORK_DIR=/opt/backup-restore
    export BACKUP_OUTPUT_DIR=/home/dex/backup
    
  2. Run the rollback-restore-service command.
    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***] rollback-restore-service -s [***NEW-SERVICE-ID***] -f [***PATH-TO-THE-BACKUP-FILE***]
    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-b48 rollback-restore-service -s cluster-92c2fkgb  -f $BACKUP_OUTPUT_DIR/cluster-c2dhkp22-2023-03-10T06_00_05.zip