dx_get_snapshots - delphix/dxtoolkit GitHub Wiki
SYNOPSIS
dx_get_snapshots [ -engine|d <delphix identifier> | -all ] [ -configfile file ]
[ -group group_name | -name db_name | -host host_name | -type dsource|vdb | -dsource name ]
[ -timeloc t|l]
[ -startDate startDate]
[ -endDate endDate]
[ -snapshotname snapshotname]
[-output_unit K|M|G|T]
[ -format csv|json ]
[ -notime ]
[ -help|? ] [ -debug ]
dx_get_snapshots [ -engine|d <delphix identifier> | -all ] [ -configfile file ]
-size [ asc | desc ]
[ -group group_name | -name db_name | -host host_name | -type dsource|vdb | -dsource name ]
[ -format csv|json ]
[ -help|? ] [ -debug ]
DESCRIPTION
Get the information about databases capacity.
ARGUMENTS
Delphix Engine selection - if not specified a default host(s) from dxtools.conf will be used.
- -engine|d Specify Delphix Engine name from dxtools.conf file
- -all Display databases on all Delphix appliance
- -configfile file Location of the configuration file. A config file search order is as follow:
- configfile parameter
- DXTOOLKIT_CONF variable
- dxtools.conf from dxtoolkit location
Filters
Filter databases using one of the following filters
- -group Group Name
- -name Database Name
- -host Host Name
- -type Type (dsource|vdb)
- -dsource name Name of dSource
- -startDate startDate Display snapshot created after startDate
- -endDate endDate Display snapshot created before endDate
- -snapshotname snapshotname Display snapshot with particular snapshot name
OPTIONS
- -size [asc | desc] Display snapshot size with depended objects list. To sort by size add asc or desc to -size option. Depended objects are displayed in the following format groupname/vdbname/timeflow status
- -notime Don't check start and end time to all snapshots. Useful to check if there was snapshot done but we are not interested in provisioning times
- -timeloc t|l Display snapshot range using a time stamps or location (ex. SCN)
- -timeflow a|c Display current fimeflow - c (default value), or display all timeflows
- -details Display more details about snapshot - version and retention time in days
- -output_unit K|M|G|T Display usage using different unit. By default GB are used Use K for KiloBytes, G for GigaBytes and M for MegaBytes, T for TeraBytes
- -format Display output in csv or json format If not specified pretty formatting is used.
- -help Print this screen
- -debug Turn on debugging
- -nohead Turn off header output
EXAMPLES
List all snapshot from engine
dx_get_snapshots -d de01loca
Engine Group Database Snapshot name Start time End time
------------------------------ -------------------- ------------------------------ ------------------------------ ------------------------- -------------------------
de01loca DB DBP @2015-12-03T08:51:51.462Z 2015-12-03 03:50:39 EST 2015-12-03 09:50:39 EST
de01loca DB DBP @2016-05-04T02:02:12.594Z 2016-05-04 04:01:11 MEST 2016-05-04 04:01:11 MEST
de01loca DB DBP @2016-08-14T07:44:44.679Z 2016-08-14 09:43:48 MEST 2016-08-14 09:43:48 MEST
de01loca DB DBP @2016-09-07T08:30:29.854Z 2016-09-07 10:25:22 MEST 2016-09-07 10:25:22 MEST
de01loca DB VDBA @2016-11-23T23:30:34.144Z 2016-11-24 00:30:43 CET 2016-11-24 00:30:47 CET
de01loca DB VDBA @2016-11-24T23:30:25.975Z 2016-11-25 00:30:47 CET 2016-11-25 00:30:51 CET
de01loca DB VDBA @2016-11-25T23:30:49.476Z 2016-11-26 00:31:10 CET 2016-11-26 00:31:15 CET
de01loca DB VDBA @2016-11-26T23:30:32.775Z 2016-11-27 00:30:40 CET 2016-11-27 00:30:48 CET
de01loca DB VDBA @2016-11-27T23:30:20.903Z 2016-11-28 00:30:24 CET 2016-11-28 00:30:28 CET
de01loca DB VDBA @2016-11-28T23:30:17.095Z 2016-11-29 00:30:22 CET 2016-11-29 00:30:31 CET
de01loca DB VDBA @2016-11-29T23:30:15.738Z 2016-11-30 00:30:25 CET 2016-11-30 17:03:23 CET
de01loca DB VDBC @2016-11-23T23:30:42.307Z 2016-11-24 00:30:49 CET 2016-11-24 00:30:52 CET
de01loca DB VDBC @2016-11-24T23:30:20.147Z 2016-11-25 00:30:27 CET 2016-11-25 00:30:38 CET
de01loca DB VDBC @2016-11-25T23:30:55.772Z 2016-11-26 00:31:08 CET 2016-11-26 00:31:12 CET
List all snapshots for database VDBA
dx_get_snapshots -d de01loca -name VDBA
Engine Group Database Snapshot name Start time End time
------------------------------ -------------------- ------------------------------ ------------------------------ ------------------------- -------------------------
de01loca DB VDBA @2016-11-23T23:30:34.144Z 2016-11-24 00:30:43 CET 2016-11-24 00:30:47 CET
de01loca DB VDBA @2016-11-24T23:30:25.975Z 2016-11-25 00:30:47 CET 2016-11-25 00:30:51 CET
de01loca DB VDBA @2016-11-25T23:30:49.476Z 2016-11-26 00:31:10 CET 2016-11-26 00:31:15 CET
de01loca DB VDBA @2016-11-26T23:30:32.775Z 2016-11-27 00:30:40 CET 2016-11-27 00:30:48 CET
de01loca DB VDBA @2016-11-27T23:30:20.903Z 2016-11-28 00:30:24 CET 2016-11-28 00:30:28 CET
de01loca DB VDBA @2016-11-28T23:30:17.095Z 2016-11-29 00:30:22 CET 2016-11-29 00:30:31 CET
de01loca DB VDBA @2016-11-29T23:30:15.738Z 2016-11-30 00:30:25 CET 2016-11-30 17:03:23 CET
List all snapshots for database VDBR from all timeflows with details
dx_get_snapshots -d de01loca -name VDBR -details -timeflow a
Engine Group Database Snapshot name Start time End time Creation time Timeflow Retentio Vers
-------------------- -------------------- -------------------- ------------------------------ ------------------------- ------------------------- ------------------------- ---------- -------- ----
de01loca DB VDBR @2016-11-24T08:30:01.679Z 2016-11-24 03:30:02 EST 2016-11-25 03:30:03 EST 2016-11-24 03:30:01 EST old Policy 11.2
de01loca DB VDBR @2016-11-25T08:30:02.560Z 2016-11-25 03:30:03 EST 2016-11-26 03:30:01 EST 2016-11-25 03:30:02 EST old Policy 11.2
de01loca DB VDBR @2016-11-26T08:30:01.550Z 2016-11-26 03:30:01 EST 2016-11-27 03:30:01 EST 2016-11-26 03:30:01 EST old Policy 11.2
de01loca DB VDBR @2016-11-27T08:30:01.564Z 2016-11-27 03:30:01 EST 2016-11-27 03:30:03 EST 2016-11-27 03:30:01 EST old Policy 11.2
de01loca DB VDBR @2016-11-28T04:25:35.839Z 2016-11-27 23:25:36 EST 2016-11-27 23:25:36 EST 2016-11-27 23:25:35 EST current Policy 11.2
de01loca DB VDBR @2016-11-28T08:30:01.724Z 2016-11-28 03:30:02 EST 2016-11-28 03:30:02 EST 2016-11-28 03:30:01 EST current Policy 11.2
de01loca DB VDBR @2016-11-29T08:30:01.690Z 2016-11-29 03:30:02 EST 2016-11-30 01:42:17 EST 2016-11-29 03:30:01 EST current Policy 11.2
de01loca DB VDBR @2016-11-30T06:42:17.547Z 2016-11-30 01:42:17 EST 2016-11-30 03:30:02 EST 2016-11-30 01:42:17 EST current 13 11.2
de01loca DB VDBR @2016-11-30T08:30:01.636Z 2016-11-30 03:30:02 EST 2016-11-30 08:42:24 EST 2016-11-30 03:30:01 EST current Policy 11.2
de01loca DB VDBR @2016-11-30T13:42:23.915Z 2016-11-30 08:42:24 EST 2016-11-30 11:14:55 EST 2016-11-30 08:42:23 EST current Policy 12.1
List size of all snapshots in descending order
dx_get_snapshots -d dc -size desc
Engine Group Database Snapshot name Creation time Size [GB] Depended objects
------------------------------ -------------------- ------------------------------ ------------------------------ ------------------------------ ------------------------------ ------------------------------------------------------------
dc group1 vcdb2 @2017-10-10T14:01:41.692Z 2017-10-10 07:01:41 PDT 0.00203
dc Sources marina @2017-10-10T11:06:21.139Z 2017-10-10 04:06:21 PDT 0.00125 group1/test/previous tf
dc Sources marina @2017-10-10T11:34:35.638Z 2017-10-10 04:34:35 PDT 0.00112 group1/testdx/current tf;group1/test/previous tf
dc group1 testdx @2017-10-10T11:40:08.525Z 2017-10-10 04:40:08 PDT 0.00094
dc group1 test @2017-10-10T12:12:07.084Z 2017-10-10 05:12:07 PDT 0.00089
dc group1 vcdb @2017-10-10T13:52:56.670Z 2017-10-10 06:52:56 PDT 0.00084
dc group1 test @2017-10-10T11:40:15.163Z 2017-10-10 04:40:15 PDT 0.00071
dc group1 vcdb @2017-10-10T13:56:20.207Z 2017-10-10 06:56:20 PDT 0.00068
dc group1 vcdb @2017-10-10T13:54:56.527Z 2017-10-10 06:54:56 PDT 0.00044 group1/vcdb2/current tf
dc group1 vdb2 @2017-10-10T14:01:50.865Z 2017-10-10 07:01:50 PDT 0.00016
dc group1 test @2017-10-10T12:07:59.135Z 2017-10-10 05:07:59 PDT 0.00010
dc group1 vpdb @2017-10-10T13:56:27.391Z 2017-10-10 06:56:27 PDT 0.00009
dc group1 vpdb @2017-10-10T13:55:03.953Z 2017-10-10 06:55:03 PDT 0.00009 group1/vdb2/current tf
dc group1 vpdb @2017-10-10T13:53:06.026Z 2017-10-10 06:53:06 PDT 0.00009
dc Sources cdbkate @2017-10-10T13:46:32.118Z 2017-10-10 06:46:32 PDT 0.00000 group1/vcdb/current tf
dc Sources marina @2017-10-10T12:05:21.936Z 2017-10-10 05:05:21 PDT 0.00000 group1/test/current tf
dc Sources PDBKATE @2017-10-10T13:47:21.166Z 2017-10-10 06:47:21 PDT 0.00000 group1/vpdb/current tf