dx_get_policy - delphix/dxtoolkit GitHub Wiki

SYNOPSIS

dx_get_policy [ -engine|d <delphix identifier> | -all ] [ -configfile file ]-policy ( RETENTION | SNAPSYNC | SNAPSHOT  | REFRESH ) | -policyname name [ -group group_name | -name db_name | -host host_name | -type dsource|vdb | -envname environment ] [-export -ourdir dir] [-mapping file] [ -format csv|json ]  [ --help|? ] [ -debug ]

DESCRIPTION

Get the list of policies from Delphix Engine.

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
  • -policy type Choose policy type to display - RETENTION | SNAPSYNC | SNAPSHOT | REFRESH

Filters

Filter databases using one of the following filters

  • -policyname Policy Name
  • -group Group Name
  • -name Database Name
  • -host Host Name
  • -type Type (dsource|vdb)
  • -envname Environment name

OPTIONS

  • -export Export all polices or policy selected by policyname
  • -outdir dir Direcotry where policies will be exported
  • -mapping filename Export mapping between policies and database / groups into filename. Use a database filters like name, group, etc to limit mapping export to the particular objects
  • -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

Display a retention policy

dx_get_policy -d DE001 -policy RETENTION

Appliance            Group           Database                       Retention                      Retention schedule
-------------------- --------------- ------------------------------ ------------------------------ ----------------------------------------------------------------------------------------------------
DE001                Sources                                        Default Retention              Logs 1 day(s), snapshots 1 week(s)
DE001                                vasmsrc1                       Default Retention              Logs 1 day(s), snapshots 1 week(s)
DE001                Untitled                                       Default Retention              Logs 1 day(s), snapshots 1 week(s)
DE001                                SLOB                           * Default Retention            Logs 1 day(s), snapshots 1 week(s)
DE001                                SLOB1                          * Default Retention            Logs 1 day(s), snapshots 1 week(s)
DE001                                Vvas_DA3                       * Default Retention            Logs 1 day(s), snapshots 1 week(s)
DE001                                installs                       * Default Retention            Logs 1 day(s), snapshots 1 week(s)

Export polices and mapping into files

dx_get_policy -d Landshark -export -outdir /tmp/policy -mapping /tmp/policy/mapping.Landshark
Exporting policy into file /tmp/policy/Default Retention.policy
Exporting policy into file /tmp/policy/Default Snapshot.policy
Exporting policy into file /tmp/policy/Default SnapSync.policy
Exporting mapping into file /tmp/policy/mapping.Landshark