Restoring Cloudera Data Warehouse using the restore-cluster command

You can reactivate the entire Cloudera Data Warehouse environment, which includes your cluster with all settings of the environment that you backed up, using the CLI.

Ensure that you have completed the backup process and deactivated the environment in Cloudera Data Warehouse to ensure successful cluster restoration. During downtime, you must prevent end-users from accessing the cluster.
Perform the following steps to deactivate the environment in Cloudera Data Warehouse:
  1. Log in to the Cloudera Data Warehouse service as a DWAdmin.
  2. Go to the Environments tab on the Overview page, and click Deactivate corresponding to the environment you want to deactivate.
  1. SSH into a host on your cluster from which you can access the Cloudera Data Services on premises cluster.
  2. Run the following command to restore the cluster:
    cdp dw restore-cluster --cluster-id [***CLUSTER-ID***] --data [***DATA-STRING-FROM-BACKUP***]
    Replace [***Cloudera Data Warehouse-CLUSTER-ID***] with the actual cluster ID of your environment. The cluster ID is a unique Cloudera Data Warehouse environment identifier.

    Replace [***DATA-STRING-FROM-BACKUP***] with the actual data string from the output of the backup.

    [--cli-input-json <value>] and [--generate-cli-skeleton] are optional parameters.

    To specify the –cli-input-json parameter, you must obtain the skeleton of the JSON file by running the following command:
    cdp dw backup-cluster --generate-cli-skeleton
    The output of this command is a JSON object as follows:
    {
        "clusterId": ""
    }
    You can now use the JSON string as a parameter for the --cli-input-json command option as follows:
    cdp dw backup-cluster --cli-input-json '{"clusterId":"[***CDW-CLUSTER-ID***]"}'
    The output contains the following information:
    • clusterId: The ID of the cluster, a unique identifier of the Cloudera Data Warehouse environment.
    • operationId: The ID of the backup operation. You can use the operation ID to query the backup execution details using the CLI.
    • action: The action to be taken on the cluster. Possible actions are Create and Skip.
    • message: The description of the cluster action.
    • dbcRestorePlans: Information about the restore-plan of the Database Catalogs.
      • item: Status of the entity after the restore operation.
      • ref: The reference of the entity in the backup data.
      • id: The ID of the entity.
      • action: The action associated with the plan. Possible actions are Create, Update, and Skip.
      • message: The description of the plan.
    • hueRestorePlans: Information about Hue's restore plan.
      • item: Status of the entity after the restore operation.
      • ref: The reference of the entity in the backup data.
      • id: The ID of the entity.
      • action: The action associated with the plan. Possible actions are Create, Update, and Skip.
      • message: The description of the plan.
    • hiveRestorePlans: Information about Hive Virtual Warehouses' restore plan.
      • item: Status of the entity after the restore operation.
      • ref: The reference of the entity in the backup data.
      • id: The ID of the entity.
      • action: The action associated with the plan. Possible actions are Create, Update, and Skip.
      • message: The description of the plan.
    • impalaRestorePlans: Information about Impala Virtual Warehouses' restore plan.
      • item: Status of the entity after the restore operation.
      • ref: The reference of the entity in the backup data.
      • id: The ID of the entity.
      • action: The action associated with the plan. Possible actions are Create, Update, and Skip.
      • message: The description of the plan.
    • vizRestorePlans: Information about the restore plan of the Cloudera Data Visualization Apps.
      • item: Status of the entity after the restore operation.
      • ref: The reference of the entity in the backup data.
      • id: The ID of the entity.
      • action: The action associated with the plan. Possible actions are Create, Update, and Skip.
      • message: The description of the plan.
After several minutes, the environment is activated, and the Virtual Warehouses are created in the new cluster and attached to the Database Catalog. The Virtual Warehouse and Cloudera Data Visualization IDs will be changed.
Adjust the Cloudera Data Visualization connection settings to point to the new Virtual Warehouse(s) if the IDs have changed.