List restored snapshots

You can use the list-restore-snapshots command to list all the restored snapshots in your CDP environment against a COD database. You can use various filters to list the snapshots, for example, snapshot name, target environment name where the snapshot is restored, target COD database, specific command ID, and time range.

Command syntax

cdp opdb list-restore-snapshots --environment-name ENVIRONMENT_NAME --database-name DATABASE_NAME [--snapshot-name SNAPSHOT_NAME] [--target-environment-name TARGET_ENVIRONMENT_NAME] [--target-database-name TARGET_DATABASE_NAME] [--command-id COMMAND_ID] [--from-restore-time FROM_RESTORE_TIME] [--to-restore-time TO_RESTORE_TIME]

Parameters

--environment-name

The name of the CDP environment.

--database-name

The name of the operational database.

--snapshot-name

The snapshot name to be restored.

--target-environment-name

The name of the target environment.

--target-database-name

The name of the target database.

--command-id

Command ID filter.

--from-restore-time

The starting snapshot restore time to search restore snapshots (inclusive).

--to-restore-time

The ending snapshot restore time to search restore snapshots (inclusive).

cdp opdb list-restore-snapshots --environment-name odx-wgel6j --database-name test
JSON output:
{
    "environmentName": "odx-wgel6j",
    "databaseName": "test",
    "restoreSnapshots": [
        {
            "snapshotName": "snapshot2_table_tob8vc",
            "targetEnvironmentName": "odx-wgel6j",
            "targetDatabaseName": "test",
            "status": "IN_PROGRESS",
            "restoreTime": 1662014023725,
            "commandID": 1546336085
        }
    ]
}
Using snapshot name filter:
cdp opdb list-restore-snapshots    --environment-name odx-wgel6j --database-name test --snapshot-name snapshot2_table_tob8vc
JSON output:
{
    "environmentName": "odx-wgel6j",
    "databaseName": "test",
    "restoreSnapshots": [
        {
            "snapshotName": "snapshot2_table_tob8vc",
            "targetEnvironmentName": "odx-wgel6j",
            "targetDatabaseName": "test",
            "status": "IN_PROGRESS",
            "restoreTime": 1662014023725,
            "commandID": 1546336085
        }
    ]
}
Using target environment name and target database name:
cdp opdb list-restore-snapshots    --environment-name odx-wgel6j --database-name test --target-environment-name odx-wgel6j --target-database-name test
JSON output:
{
    "environmentName": "odx-wgel6j",
    "databaseName": "test",
    "restoreSnapshots": [
        {
            "snapshotName": "s2",
            "targetEnvironmentName": "odx-wgel6j",
            "targetDatabaseName": "test",
            "status": "SUCCESSFUL",
            "restoreTime": 1662035967244,
            "commandID": 1546336475
        },
        {
            "snapshotName": "snapshot2_table_tob8vc",
            "targetEnvironmentName": "odx-wgel6j",
            "targetDatabaseName": "test",
            "status": "IN_PROGRESS",
            "restoreTime": 1662014023725,
            "commandID": 1546336085
        }
    ]
}