Backing up the data connector
You must back up your data connectors before you delete or upgrade your cluster.
-
Get the CDE Service URL.
- In the Cloudera Data Platform (CDP) console, click the Data Engineering tile. The CDE Home page displays.
- In the CDE Services column, click for the CDE service.
- Click on GRAFANA CHARTS and get the domain name.
- 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.
-
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)
-
Note the cluster-ID.
- In the Cloudera Data Platform (CDP) console, click the Data Engineering tile. The CDE Home page displays.
- In the CDE Services column, click for the CDE service.
- Click on GRAFANA CHARTS and get the domain name.
- Note the Cluster ID shown on the page.
-
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