Skip to content

dx_ctl_dbhooks

Marcin Przepiorowski edited this page Jan 10, 2019 · 2 revisions

SYNOPSIS

dx_ctl_dbhooks    [ -engine|d <delphix identifier> | -all ] [ -configfile file ]
                  <-action delete|set|load>
                  [ -hookname hook_name ]
                  [ -hooktype configureClone|preRefresh|postRefresh|preRollback|postRollback|preSnapshot|postSnapshot|preStart|postStart|preStop|postStop ]
                  [ -dbname dbname | -group group | -host host | -type type ]
                  [ -hook [hookname,]template|filename[,OS_shell]]
                  [ -indir /path ]

DESCRIPTION

Import operation template into 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

Options

  • -hookname Hook name

  • -hooktype Hook type - configureClone,preRefresh,postRefresh,preRollback,postRollback,preSnapshot,postSnapshot,preStart,postStart,preStop,postStop

  • -hook Hook definition. File name is a path to a file with a hook body on machine with dxtoolkit. Template name is an operational template name

    Allowed combinations: - hookname,template_name,OS_shell - hookname,filename,OS_shell - hookname,template_name - hookname,filename - template_name - filename

  • -group Group Name

  • -dbname Database Name

  • -host Host Name

  • -type Type (dsource|vdb)

  • -indir dir Location of directory with hook files

  • -format Display output in csv or json format If not specified pretty formatting is used.

  • -help Print this screen

  • -debug Turn on debugging

EXAMPLES

Adding a ConfigureClone hook for database autotest with hook name hook1, defined in file ./hook1 to be executed by BASH shell

dx_ctl_dbhooks -d Landshark51 -action set -hook hook1,./hook1,BASH -hooktype configureclone -dbname autotest
Waiting for all actions to complete. Parent action is ACTION-12767
Hook added

Delete a ConfigureClone hook for database autotest with hook name hook1

dx_ctl_dbhooks -d Landshark51 -action delete -hooktype configureclone -hookname hook1 -dbname autotest
Waiting for all actions to complete. Parent action is ACTION-12769
Hook deleted
Hook configureClone with name hook1 was sucessfully deleted

Loading hooks from directory created by dx_get_dbhooks for all VDBs

dx_ctl_dbhooks -d Landshark51 -action load -indir /tmp/hooks/ -type VDB
Adding hooks to database Analytics / autofs
Hooktype configureClone hookname hook1 from /tmp/hooks/Analytics/autofs/configureClone/hook1.BASH
Waiting for all actions to complete. Parent action is ACTION-12810
Hook added
Hooktype preRollback hookname savestate from /tmp/hooks/Analytics/autofs/preRollback/savestate.BASH
Waiting for all actions to complete. Parent action is ACTION-12811
Hook added
Adding hooks to database Analytics / OH121_TARGET
Hooktype configureClone hookname hook1 from /tmp/hooks/Analytics/OH121_TARGET/configureClone/hook1.BASH
Waiting for all actions to complete. Parent action is ACTION-12812
Hook added
Adding hooks to database Analytics / OH122_TARGET
Hooktype configureClone hookname hook1 from /tmp/hooks/Analytics/OH122_TARGET/configureClone/hook1.BASH
Waiting for all actions to complete. Parent action is ACTION-12813
Hook added
Adding hooks to database Analytics / vdb122
Hooktype configureClone hookname hook1 from /tmp/hooks/Analytics/vdb122/configureClone/hook1.BASH
Waiting for all actions to complete. Parent action is ACTION-12814
Hook added
You can’t perform that action at this time.