Backing up the data connector

You must back up your data connectors before you delete or upgrade your cluster.

Install jq on the host machine where you want to run the backup and restore commands.
  1. Get the Cloudera Data Engineering Service URL.
    1. In the Cloudera console, click the Data Engineering tile. The Cloudera Data Engineering Home page displays.
    2. In the Services column, click for the Cloudera Data Engineering service.
    3. Click on GRAFANA CHARTS and get the domain name.
    4. Note the URL. For example, if the URL copied is https://service.cde-n82xsqpr.apps.apps.shared-rke-dev-01.kcloud.example.com/grafana/d/sK1XDusZz/kubernetes, use only the https://service.cde-n82xsqpr.apps.apps.shared-rke-dev-01.kcloud.example.com as the Cloudera Data Engineering Service URL.
  2. Get the Cloudera Data Engineering token for your Cloudera Data Engineering service URL.
    export CDE_TOKEN=$(curl -k -L -u <user-name>:<password> https://<cde service url>/gateway/authtkn/knoxtoken/api/v1/token | jq -r .access_token)

    Example:

    export CDE_TOKEN=$(curl -k -L -u dexssoadmin:Password@123 https://service.cde-4x6s29mx.apps.apps.shared-os-qe-01.kcloud.cloudera.com/gateway/authtkn/knoxtoken/api/v1/token | jq -r .access_token)
  3. Note the cluster-ID.
    1. In the Cloudera console, click the Data Engineering tile. The Cloudera Data Engineering Home page displays.
    2. In the Services column, click for the Cloudera Data Engineering service.
    3. Click on GRAFANA CHARTS and get the domain name.
    4. Note the Cluster ID shown on the page.
  4. Provide the Cloudera Data Engineering token and cluster-ID and run the data connector backup command.
    curl --location --request POST 'https://<cde service url>/data-connectors/v1/backupDataConnections' \
    --header "Authorization: Bearer ${CDE_TOKEN}" \
    --data-raw '{
      "clusterId": "<cluster id of cluster that needs backing up>"
    }' --insecure | jq .zipFile | tr -d '"'  | base64 -d > backup-dataconnectors.zip

    Example:

    curl --location --request POST 'https://service.cde-4x6s29mx.apps.apps.shared-os-qe-01.kcloud.cloudera.com/data-connectors/v1/backupDataConnections' \
    --header "Authorization: Bearer ${CDE_TOKEN}" \
    --data-raw '{
      "clusterId": "cluster-4x6s29mx"
    }' --insecure | jq .zipFile | tr -d '"'  | base64 -d > backup-dataconnectors.zip