Skip to content

dx_ctl_policy

Marcin Przepiorowski edited this page Jun 3, 2021 · 6 revisions

SYNOPSIS

dx_ctl_policy   [ -engine|d <delphix identifier> | -all ]
                [ -configfile file ]
                -import | -update [ -filename filename | -indir dir]
                -mapping mapping_file
                [-skipdefault]
                [ -help|? ]
                [ -debug ]

DESCRIPTION

Import or update a Delphix Engine policy from file name or directory.

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
  • -import Import policy from file or directory
  • -update Update policy from file or directory
  • -mapping mapping_file Apply policy to databases / groups using mapping file mapping_file

OPTIONS

  • -filename Template filename
  • -indir Location of imported templates files
  • -skipdefault Skip update of the default polices - if used with -update option. By default all default polices are updated.
  • -help Print this screen
  • -debug Turn on debugging

EXAMPLES

Import polices from /tmp/policy directory into engine.

dx_ctl_policy -d Landshark43 -import -indir /tmp/policy
Policy Default Retention from file /tmp/policy/Default Retention.policy already exist. Problem with load policy from file /tmp/policy/Default Retention.policy
Policy Default Snapshot from file /tmp/policy/Default Snapshot.policy already exist. Problem with load policy from file /tmp/policy/Default Snapshot.policy
Policy Default SnapSync from file /tmp/policy/Default SnapSync.policy already exist. Problem with load policy from file /tmp/policy/Default SnapSync.policy
Policy jsontest from file /tmp/policy/jsontest.policy already exist.
Problem with load policy from file /tmp/policy/jsontest.policy
Importing policy from file /tmp/policy/marcintest.policy. Import completed
Importing policy from file /tmp/policy/test.policy. Import completed
Policy www from file /tmp/policy/www.policy already exist.
Problem with load policy from file /tmp/policy/www.policy

Update existing polices using files from directory /tmp/policy

dx_ctl_policy -d Landshark43 -update -indir /tmp/policy
Updating policy Default Retention from file /tmp/policy/Default Retention.policy.
Update completed Updating policy Default Snapshot from file /tmp/policy/Default Snapshot.policy.
Update completed Updating policy Default SnapSync from file /tmp/policy/Default SnapSync.policy.
Update completed Updating policy jsontest from file /tmp/policy/jsontest.policy. Update completed
Updating policy marcintest from file /tmp/policy/marcintest.policy. Update completed
Updating policy test from file /tmp/policy/test.policy. Update completed
Updating policy www from file /tmp/policy/www.policy. Update completed

Update existing polices using files from directory /tmp/policy but skip default policy

dx_ctl_policy -d 603 -update -indir /tmp/policy -skipdefault
Skipping default policy Default Snapshot
Updating policy ret1 from file /tmp/policy/ret1.policy. Update completed
Skipping default policy Default SnapSync
Skipping default policy Default Retention
Updating policy ret2 from file /tmp/policy/ret2.policy. Update completed

Apply polices to Delphix Engine objects using a mapping file

dx_ctl_policy -d Landshark43 -mapping /tmp/policy/mapping.Landshark
Database Masking in group Analytics doesn't exist. Skipping
Database Masking in group Analytics doesn't exist. Skipping
Database racdb in group Sources doesn't exist. Skipping
Database racdb in group Sources doesn't exist. Skipping
Applying policy Default Retention to database Employee Oracle 11G DB
Apply completed
Applying policy Default SnapSync to database Employee Oracle 11G DB
Apply completed

Delphix

Clone this wiki locally