Restoring CDW using the restore-cluster command

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

  1. SSH into a host on your cluster from which you can access the CDP Private Cloud Data Services cluster.
  2. Run the following command to restore the cluster:
    cdp dw restore-cluster --cluster-id [***CLUSTER-ID***] --data [***DATA-STRING-FROM-BACKUP***]

    Replace [***CDW-CLUSTER-ID***] with the actual cluster ID of your environment. The cluster ID is a unique CDW 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 CDW 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 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 Data Visualization IDs will be changed.
Adjust the Data Visualization connection settings to point to the new Virtual Warehouse(s) if the IDs have changed.