Recreating the Virtual Warehouses

You recreate the Virtual Warehouses in a few steps.

To recreate the Virtual Warehouses, you use the dw restore-cluster command. This command also restores Data Visualization apps, but additional steps are required as described in section “Restoring Data Visualization”.
  1. Create a CLI skeleton file to serve the base file for the restore command.
    For example, replace <your new cluster id> placeholder with the ID of the newly activated cluster (for example env-npk886 shown step 4 of Reactivating the environment).
    export NEW_CLUSTER_ID="<your new cluster id>"
    cdp \
      --profile ${CDP_PROFILE} \
      dw restore-cluster \
       --generate-cli-skeleton \ file://restore_${NEW_CLUSTER_ID}_cli_input.json
  2. Open restore_<new-cluster-id>_cli_input.json for editing, and fill in the clusterId and the data fields.
    To accomplish this, copy contents of the dump_${CLUSTER_ID}.json file from the backup step to the data field in the restore_<new-cluster-id>_cli_input.json file.
    For example:
    {
       "clusterId": "env-npk886",
       "data": "UEsDBBQ…AAAAAAAAAAABkYXRhUEsFBgAAAAABAAEAMgAAAKuBAQAAAA==",
    }
  3. Use the dw restore-cluster command with the CLI input JSON file created in the previous step.
    cdp \
      --profile ${CDP_PROFILE} \
      dw restore-cluster \
       --cli-input-json file://restore_${NEW_CLUSTER_ID}_cli_input.json
    Example output:
    {
        "clusterId": "env-npk886",
        "operationId": "e279bc25-6eb2-45d5-b2a5-ebdaf8d9c809",
        "dbcRestorePlans": [],
        "hiveRestorePlans": [
            {
                "ref": "org-master-prd-hive",
                "action": "Create",
                "message": "the org-master-prd-hive Hive Virtual Warehouse will be crated and attached to the warehouse-1676473680-986m DB Catalog"
            }
        ],
        "impalaRestorePlans": [
            {
                "ref": "impala-master-prd-impala",
                "action": "Create",
                "message": "the impala-master-prd-impala Impala Virtual Warehouse will be crated and attached to the warehouse-1676473680-986m DB Catalog"
            }
        ],
        "vizRestorePlans": [
            {
                "ref": "viz-analyst",
                "action": "Create",
                "message": "the viz-analyst Data Visualization will be created"
            },
            {
                "ref": "viz-scientist",
                "id": "viz-1678182673-jzxs",
                "action": "Skip",
                "message": "the Data Visualization viz-scientist exist with id viz-1678182673-jzxs, no change will be applied"
            }
        ]
    }
                  
    After several minutes the Virtual Warehouses will be created in the given cluster and attached to the Database Catalog. The Virtual Warehouse and Data Visualization ids have changed.
  4. Monitor the environment restoration as described in Monitoring environment restoration.
You must use the new Virtual Warehouse and Data Visualization ids to restore the HUE or DataViz databases as described in the next section.