Backing Up and Restoring the Cloudera Manager Configuration
You can use the Cloudera Manager REST API to export and import all of its configuration data. The API exports a JSON document that contains configuration data for the Cloudera Manager instance. You can use this JSON document to back up and restore a Cloudera Manager deployment.
Minimum Required Role: Cluster Administrator (also provided by Full Administrator) This feature is not available when using Cloudera Manager to manage Data Hub clusters.
- Export the Cloudera Manager configuration:
- Log in to the Cloudera Manager server host as the
root
user. - Run the following command:
# curl -u admin_uname:admin_pass "http://cm_server_host:7180/api/v40/cm/deployment" > path_to_file/cm-deployment.json
Where:admin_uname
is a username with either the Full Administrator or Cluster Administrator role.admin_pass
is the password for the admin_uname username.cm_server_host
is the hostname of the Cloudera Manager server.path_to_file
is the path to the file where you want to save the configuration.
- Log in to the Cloudera Manager server host as the
- Redact Sensitive information from the Exported
ConfigurationThe exported configuration may contain passwords and other sensitive information. You can configure redaction of the sensitive items by specifying a JVM parameter for Cloudera Manager. When you set this parameter, API calls to Cloudera Manager for configuration data do not include the sensitive information.
To configure redaction for the API:
- Log in the Cloudera Manager server host.
- Edit the
/etc/default/cloudera-scm-server
file by adding the following property (separate each property with a space) to the line that begins with export CMF_JAVA_OPTS.
For example:-Dcom.cloudera.api.redaction=true
export CMF_JAVA_OPTS="-Xmx2G -Dcom.cloudera.api.redaction=true"
- Restart Cloudera Manager:
sudo service cloudera-scm-server restart
- Restore the Cloudera Manager Configuration
Using a previously saved JSON document that contains the Cloudera Manager configuration data, you can restore that configuration to a running cluster.
- Using the Cloudera Manager Administration Console, stop
all running services in your cluster:
- On the Home > Status tab, click to the right of the cluster name and select Stop.
- Click Stop in the confirmation screen. The Command
Details window shows the progress of stopping
services.
When All services successfully stopped appears, the task is complete and you can close the Command Details window.
- Log in to the Cloudera Manager server host as the
root
user. - Run the following command:
curl -H "Content-Type: application/json" --upload-file path_to_file/cm-deployment.json -u admin:admin http://cm_server_host:7180/api/v40/cm/deployment?deleteCurrentDeployment=true
Where:admin_uname
is a username with either the Full Administrator or Cluster Administrator role.admin_pass
is the password for the admin_uname username.cm_server_host
is the hostname of the Cloudera Manager server.path_to_file
is the path to the file containing the JSON configuration file.
- Restart the Cloudera Manager Server.
- RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
-
sudo systemctl restart cloudera-scm-server
- RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
-
sudo service cloudera-scm-server restart
- Using the Cloudera Manager Administration Console, stop
all running services in your cluster: