Restore a snapshot

You can use the restore-snapshot command to import a snapshot automatically from the snapshot location. This command restores a snapshot and deletes it afterward.

Command syntax

cdp opdb restore-snapshot --environment-name ENVIRONMENT_NAME --database-name DATABASE_NAME --snapshot-name SNAPSHOT_NAME --target-environment-name TARGET_ENVIRONMENT_NAME --target-database-name TARGET_DATABASE_NAME

Parameters

--environment-name

The name of the original CDP environment.

--database-name

The name of the original operational database.

--snapshot-name

The name of the snapshot to be restored.

--target-environment-name

The name of the target environment where the snapshot should be restored.

--target-database-name

The name of the target database where the snapshot should be restored.

cdp opdb restore-snapshot --environment-name odx-wgel6j --database-name test --snapshot-name s2 --target-environment-name odx-wgel6j --target-database-name test
JSON output:
{
    "environmentName": "odx-wgel6j",
    "databaseName": "test",
    "snapshotName": "s2",
    "targetEnvironmentName": "odx-wgel6j",
    "targetDatabaseName": "test",
    "status": "IN_PROGRESS",
    "restoreTime": 1662036779279,
    "commandID": 1546336475
}