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 CDE Service URL.
    1. In the Cloudera Data Platform (CDP) console, click the Data Engineering tile. The CDE Home page displays.
    2. In the CDE Services column, click for the CDE 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 CDE Service URL.
  2. Get the CDE token for your CDE 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 Data Platform (CDP) console, click the Data Engineering tile. The CDE Home page displays.
    2. In the CDE Services column, click for the CDE service.
    3. Click on GRAFANA CHARTS and get the domain name.
    4. Note the Cluster ID shown on the page.
  4. Provide the CDE 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