The following command lists the snapshots created in the environment against
the COD database filters like table name, command ID, and time
range.
cdp opdb list-snapshots --environment-name
ENVIRONMENT_NAME
--database-name
DATABASE_NAME [--table-name
TABLE_NAME] [--command-id
COMMAND_ID] [--from-creation-time
FROM_CREATION_TIME]
[--to-creation-time
TO_CREATION_TIME]
Examples
Without
filters
cdp opdb list-snapshots --environment-name odx-wgel6j --database-name jpfy
{
"environmentName": "odx-wgel6j",
"databaseName": "jpfy",
"snapshots": [
{
"tableName": "table_tob8vc",
"snapshotName": "snapshot3_table_tob8vc",
"creationTime": 1662014265011,
"status": "SUCCESSFUL",
"commandID": 1546336058,
"snapshotLocation": "abfs://qedailynat-filesystem@qedailynatstorageaccount.dfs.core.windows.net/cod-rtzupxh843ua/hbase"
},
{
"tableName": "table_tob8vc",
"snapshotName": "snapshot2_table_tob8vc",
"creationTime": 1662014023725,
"status": "SUCCESSFUL",
"commandID": 1546336035,
"snapshotLocation": "abfs://qedailynat-filesystem@qedailynatstorageaccount.dfs.core.windows.net/cod-rtzupxh843ua/hbase"
},
{
"tableName": "table_tob8vc",
"snapshotName": "snapshot1_table_tob8vc",
"creationTime": 1662013782370,
"status": "DELETED",
"commandID": 1546336077,
"snapshotLocation": "abfs://qedailynat-filesystem@qedailynatstorageaccount.dfs.core.windows.net/cod-rtzupxh843ua/hbase"
},
{
"tableName": "table_lpirwy",
"snapshotName": "snapshot_table_lpirwy",
"creationTime": 1662013568312,
"status": "DELETED",
"commandID": 1546336004,
"snapshotLocation": "abfs://qedailynat-filesystem@qedailynatstorageaccount.dfs.core.windows.net/cod-rtzupxh843ua/hbase"
}
]
}
With command ID
filter
$ cdp opdb list-snapshots --environment-name odx-wgel6j --database-name jpfy --command-id 1546336385
{
"environmentName": "odx-wgel6j",
"databaseName": "jpfy",
"snapshots": [
{
"tableName": "table_6uf7xt",
"snapshotName": "s2",
"creationTime": 1662035967244,
"status": "SUCCESSFUL",
"commandID": 1546336385,
"snapshotLocation": "abfs://qedailynat-filesystem@qedailynatstorageaccount.dfs.core.windows.net/cod-rtzupxh843ua/hbase/"
}
]
}
With table name
filter
$ cdp opdb list-snapshots --environment-name odx-wgel6j --database-name jpfy --table-name table_6uf7xt
{
"environmentName": "odx-wgel6j",
"databaseName": "jpfy",
"snapshots": [
{
"tableName": "table_6uf7xt",
"snapshotName": "s2",
"creationTime": 0,
"status": "SUCCESSFUL",
"commandID": 1546336385,
"snapshotLocation": "abfs://qedailynat-filesystem@qedailynatstorageaccount.dfs.core.windows.net/cod-rtzupxh843ua/hbase/"
}
]
}