dx_ctl_snapshots - delphix/dxtoolkit GitHub Wiki
SYNOPSIS
dx_ctl_snapshots [ -engine|d <delphix identifier> | -all ] [ -configfile file ]
-action update | delete
[-retention days | policy | forever ]
[-snapshotname snapshotname]
[-group group_name | -name db_name | -host host_name | -type dsource|vdb ]
[-startDate startDate]
[-endDate endDate]
[-skip]
[-help|? ] [ -debug ]
DESCRIPTION
Update retention policy on snapshots or delete snapshots
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
-
-action action Action to run for snapshot(s). Allowed values are:
update - to change retention
delete - to delete snapshot
Filters
Filter databases using one of the following filters
- -group Group Name
- -name Database Name
- -host Host Name
- -type Type (dsource|vdb)
- -startDate startDate Display snapshot created after startDate
- -endDate endDate Display snapshot created before endDate
- -snapshotname snapshotname Display snapshot with particular snapshot name
OPTIONS
- -retention retention
Set snapshot retention to a number of days. Allowed values:
- number - number of days, ex. 10
- policy - use Retention policy for snapshot
- forever - keep snapshot forever
- -skip Skip confirmation of update or deletion
- -timeflow a|c Display current fimeflow - c (default value), or display all timeflows
- -help Print this screen
- -debug Turn on debugging
- -nohead Turn off header output
EXAMPLES
Set policy retention for all snapshot of database "Oracle dsource"
dx_ctl_snapshots -d Landshark5 -action update -retention policy -name "Oracle dsource"
Snapshots list:
Group 'Sources' DB name 'Oracle dsource' Snapshot time: 2016-10-03 07:13:45 EDT Snapshot name: @2016-10-03T11:13:52.335Z
Group 'Sources' DB name 'Oracle dsource' Snapshot time: 2016-10-12 08:02:16 EDT Snapshot name: @2016-10-12T12:02:31.027Z
Do you want to modify / delete these snapshots: (y/(n)) - use -skip to skip this confirmation
y
Snapshot @2016-10-03T11:13:52.335Z updated
Snapshot @2016-10-12T12:02:31.027Z updated
Set policy retention for snapshot created after 2016-10-12 13:30 of database autotest
dx_ctl_snapshots -d Landshark5 -action update -retention policy -name "test2" -startDate "2016-10-12 13:30"
Snapshots list:
Group 'Analytics' DB name 'test2' Snapshot time: 2016-10-12 15:20:09 IST Snapshot name: @2016-10-12T14:20:08.826Z
Do you want to modify / delete these snapshots: (y/(n)) - use -skip to skip this confirmation
y
Snapshot @2016-10-12T14:20:08.826Z updated
Set retention to 7 days for all snapshot of database test2 without confirmation
dx_ctl_snapshots -d Landshark5 -action update -retention 7 -name "test2" -skip
Snapshot @2016-10-12T12:21:11.234Z updated
Snapshot @2016-10-12T14:20:08.826Z updated