restore-snapshot

subtitle

Restore snapshot.

version

0.9.112

Description

Restores a specific snapshot.

Synopsis

  restore-snapshot
--cluster-crn <value>
--restore-snapshot-arguments <value>
[--cli-input-json <value>]
[--generate-cli-skeleton]

Options

--cluster-crn (string)

CRN of the cluster where the snapshot policy is.

--restore-snapshot-arguments (object)

Arguments for restoring a HDFS or HBase snapshot.

snapshotType -> (string)

The snapshot type of snapshot policies.

restoreHdfsSnapshotArgs -> (object)

Arguments for restoring a HDFS snapshot.

path -> (string)

The snapshotted path.

snapshotName -> (string)

The name of the snapshot to be restored.

snapshotPath -> (string)

The absolute path of the snapshot to be restored.

destinationPath -> (string)

The path to restore the snapshot into.

distCpArgs -> (object)

The distcp arguments for restoring a HDFS snapshot.

mapreduceServiceName -> (string)

The MapReduce or YARN service to use.

schedulerPoolName -> (string)

The name of a resource pool in the field. The value entered is used by the MapReduce Service you specified when Cloudera Manager executes the MapReduce job for restoring the snapshot.

userName -> (string)

The CM user used to run the job restoring the snapshot.

logPath -> (string)

An alternate path for logs.

numMaps -> (integer)

The number of mappers to use for the mapreduce job restoring the snapshot.

bandwidthPerMap -> (integer)

The maximum bandwidth (in MB) per mapper in the mapreduce job restoring the snapshot.

abortOnError -> (boolean)

Whether to abort the job on an error. If selected, files copied up to that point remain in the destination, but no additional files are copied.

replicationStrategy -> (string)

Replication strategy.

skipChecksumChecks -> (boolean)

Whether to skip checksum checks. If set to true, checksum validation will not be performed.

removeMissingFiles -> (boolean)

Whether to delete destination files that are missing in source.

skipTrash -> (boolean)

Whether to permanently delete destination files that are missing in source.

preserveBlockSize -> (boolean)

Whether to preserve the HDFS block size.

preserveReplicationCount -> (boolean)

Whether to preserve the HDFS replication count.

preservePermissions -> (boolean)

Whether to preserve the HDFS owner, group and permissions.

restoreHBaseSnapshotArgs -> (object)

Arguments for restoring a HBase snapshot.

snapshotName -> (string)

The name of the snapshot to be restored.

storageType -> (string)

The location where the HBase shapshot is stored.

creationTime -> (datetime)

The time when the snapshot to be restored was created. This value should equal the ‘endTime’ attribute of the snapshot restore command that created the snapshot.

isClone -> (boolean)

Whether to restore or clone the snapshot. Cloning a snapshot creates a new read/write table that serves the data kept at the time of the snapshot. The original table and the cloned table can be modified independently; new data written to one table does not show up on the other. Restoring a snapshot replaces the current version of a table with different version based on the snapshot.

tableName -> (string)

If the hbase operation is ‘clone’, a table name should be provided, which will be the name of the new table created when cloning the snapshot. If the hbase operation is ‘restore’, the table name should be empty.

Shorthand Syntax:

snapshotType=string,restoreHdfsSnapshotArgs={path=string,snapshotName=string,snapshotPath=string,destinationPath=string,distCpArgs={mapreduceServiceName=string,schedulerPoolName=string,userName=string,logPath=string,numMaps=integer,bandwidthPerMap=integer,abortOnError=boolean,replicationStrategy=string,skipChecksumChecks=boolean,removeMissingFiles=boolean,skipTrash=boolean,preserveBlockSize=boolean,preserveReplicationCount=boolean,preservePermissions=boolean}},restoreHBaseSnapshotArgs={snapshotName=string,storageType=string,creationTime=datetime,isClone=boolean,tableName=string}

JSON Syntax:

{
  "snapshotType": "HDFS"|"HBASE",
  "restoreHdfsSnapshotArgs": {
    "path": "string",
    "snapshotName": "string",
    "snapshotPath": "string",
    "destinationPath": "string",
    "distCpArgs": {
      "mapreduceServiceName": "string",
      "schedulerPoolName": "string",
      "userName": "string",
      "logPath": "string",
      "numMaps": integer,
      "bandwidthPerMap": integer,
      "abortOnError": true|false,
      "replicationStrategy": "DYNAMIC"|"STATIC",
      "skipChecksumChecks": true|false,
      "removeMissingFiles": true|false,
      "skipTrash": true|false,
      "preserveBlockSize": true|false,
      "preserveReplicationCount": true|false,
      "preservePermissions": true|false
    }
  },
  "restoreHBaseSnapshotArgs": {
    "snapshotName": "string",
    "storageType": "LOCAL"|"REMOTE_S3",
    "creationTime": datetime,
    "isClone": true|false,
    "tableName": "string"
  }
}

--cli-input-json (string)

Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (boolean)

Prints a sample input JSON to standard output. Note the specified operation is not run if this argument is specified. The sample input can be used as an argument for --cli-input-json.

Output

restoreSnapshotCommand -> (object)

Response object for get command status.

commandId -> (integer)

Id of the CM command.

success -> (boolean)

Whether the diagnostic collection is successful.

active -> (boolean)

Whether the command is still active.

name -> (string)

Name of the policy.

startTime -> (string)

Start time of the CM command.

endTime -> (string)

End time of the CM command.

resultDataUrl -> (string)

Some commands have result data URL for downloading the diagnostic bundle. On certain CM versions the bundle download is only available through this URL, but not with download-diagnostic-bundle operation.

resultMessage -> (string)

Result message of the command.

bundleStatus -> (string)

The current status of the command.

bundleStatusMessage -> (string)

Further information about the current command status.

Form Factors

public