Hook operations allow you to execute custom operations at select points during linking sources and managing virtual datasets. For example, you may want to prevent your monitoring systems from triggering during VDB startup and shutdown. In this case, you would leverage pre- and post-hooks to run required scripts for VDB start/stop operations.

Unix-based operating systems will execute hook scripts in bash, while Windows operating systems will execute using PowerShell.

Each Delphix object will have its own set of hooks you can create. To easily manage hooks across multiple datasets, you can create hook templates to apply the same hook to many objects.

Setting Hook Operations

You can construct hook operation lists through the Delphix Management application or the command-line interface (CLI). You can either define the hooks as part of the provisioning process or edit them on virtual datasets that already exist.

Hook operations can be created in the Hooks tab of the Add dSource or Add VDB wizards.

To edit hook operations on a dataset, navigate to the datasets page and find the object’s configuration. You will see a ‘Hooks’ tab where you can manage and modify hook operations.

Hook Operation Templates

You can use templates to store commonly used operations, which allows you to avoid repeated work when an operation is applicable to more than a single virtual dataset. You manage templates through the Delphix Management application.

Hook Operations List

dSource Hooks

Hook

Description

Pre Sync

Pre Sync hook operations are executed before a Snapsync of a dSource.

These operations can quiesce data to be captured during the Snapsync, or stop application processes that may interfere with the Snapsync operation.

Post Sync

Post Sync hook operations are executed after a Snapsync operation of a dSource.

These operations can undo any changes made by the pre-sync hooks. They will run regardless of the success of pre-sync hook operations or the Snapsync itself.

Virtual Database Hooks

Hook

Description

Configure Clone

Operations performed after initial provision or after a refresh.

This hook will run after the virtual dataset has been started.

During a refresh, this hook will run before the Post Refresh hook.

Pre Refresh

Operations performed before a refresh.

This hook will run before the virtual dataset has been stopped.

These operations can cache data from the virtual dataset to be restored after the refresh completes.

Post Refresh

Operations performed after a refresh.

This hook will run after the virtual dataset has been started and after the Configure Clone hook.

This hook will not run if the refresh or Pre Refresh hook operations fail.

These operations can restore cached data after the refresh completes.

Pre Rollback

Operations performed before a rollback, also known as rewind.

This hook will run before the virtual dataset has been stopped. 

These operations can cache data from the virtual dataset to be restored after the rewind completes.

Post Rollback

Operations performed after a rollback, also known as rewind. This hook will not run if the rewind or Pre Rewind hook operations fail.

This hook will run after the virtual dataset has been started.

This hook will not run if the rewind or Pre Rewind hook operations fail.

These operations can restore cached data after the rewind completes.

Pre Snapshot

Operations performed before a snapshot.

These operations can quiesce data to be captured during the snapshot, or stop processes that may interfere with the snapshot.

Post Snapshot

Operations performed after a snapshot.

This hook will run regardless of the success of the snapshot or Pre Snapshot hook operations.

These operations can undo any changes made by the Pre Snapshot hook.

Pre Start

Operations performed before the startup of a VDB or vFile.

These operations can be used to initialize configuration files or stop processes that might interfere with the virtual dataset.

Post Start

Operations performed after the startup of a VDB of vFile.

These operations can be used to clean up any temporary files, or restart processes that may have been stopped by a Pre-Start hook, or log notifications.

Pre Stop

Operations performed before the shutdown of a VDB or vFile.

These operations can quiesce data or processes prior to the virtual dataset shutdown.

Post Stop

Operations performed after the shutdown of a VDB or vFile.

These operations can be used to log notifications, clean up any temporary files, or stop/restart related processes.

Staging Server Hooks

Staging Server hooks are currently applicable to SAP ASE and staged plugins (Db2, HANA, and PostgreSQL) environments, and execute on the configured staging server.

Hook

Description

Pre Validated Sync

Operations performed on a staging server before validated sync.

This hook will run before the validated sync operation whenever the validated sync run is triggered.

Post Validated Sync

Operations performed on staging server after validated sync.

This hook will run after the validated sync operation whenever the validated sync run is triggered.

Related Topics