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.

Exporting the Cloudera Manager Configuration
  1. Export the Cloudera Manager configuration:
    1. Log in to the Cloudera Manager server host as the root user.
    2. 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.
  2. Redact Sensitive information from the Exported Configuration
    The 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:

    1. Log in the Cloudera Manager server host.
    2. 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.
      -Dcom.cloudera.api.redaction=true
      For example:
      export CMF_JAVA_OPTS="-Xmx2G -Dcom.cloudera.api.redaction=true"
    3. Restart Cloudera Manager:
      sudo service cloudera-scm-server restart
  3. 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.

    1. Using the Cloudera Manager Administration Console, stop all running services in your cluster:
      1. On the Home > Status tab, click to the right of the cluster name and select Stop.
      2. 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.

    2. Log in to the Cloudera Manager server host as the root user.
    3. 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.
    4. 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