Pre/Post Processes - How To

Topics | How To | Support


Add Pre/Post Commands to Restore Jobs

Change Account for Executing Pre/Post Commands (Data Protection)

Change Account for Executing Pre/Post Commands (Data Recovery)

Change Account for Executing Pre/Post Commands (Recovery Points)

Configure a Command Delay for a Pre/Post Process on NetWare/NDS Computers

Configure a Replication Set for Pre/Post Processes for Recovery Point Creation

Configure a Subclient for Pre/Post Processing of Data Protection/Archive Operations

Configure Pre/Post Binding Scripts for the Quick Recovery Agent

Configure Pre/Post Snapshot Scripts for the Windows File System iDataAgent

Create Pre/Post Backup Process Scripts to Back up VMware Virtual Machines Using the Linux File System iDataAgent

Remove a Process from Pre/Post Processing of Data Protection/Archive Operations


Add Pre/Post Commands to Restore Jobs

Before You Begin:

Required Capability: Capabilities and Permitted Actions

wedge.gif (136 bytes)To add Pre/Post commands to restore jobs:

  1. Begin any restore procedure. See Basic Restore or Browse and Restore for step-by-step instructions.
  2. From the Restore Options dialog box, click the Advanced button.
  3. From the Advanced Restore Options dialog box, click the Pre/Post tab to open the dialog box from which you can assign Pre/Post commands to the restore operation.
  4. Click inside the text box that corresponds to the restore phase that you want to start the process.
  5. Type the full path of the process (i.e., batch file or shell script) that you want executed. Alternatively, use Browse to locate the process (applicable only for paths that do not contain any spaces).
  6. Repeat Steps 4 and 5 for each additional phase/process that you want executed.
  7. If you want to run a PostRestore process for all attempts to run the restore job phase, then select the corresponding checkbox.
  8. If no Pre/Post Impersonation account is currently selected, or if you want to change the account, select Use Local System Account, or select Impersonate User (applicable for Windows clients) and enter a user name and password. Click OK.
  9. If you selected Local System Account, click OK to the message advising you that commands using this account have rights to access all data on the client computer.
  10. Click OK to save your entries. This closes the Pre/Post commands dialog box.
  11. Optionally, select any additional restore options from the Restore Options dialog box.
  12. Click OK.
  13. Click Schedule to schedule the job, or click OK to run the job. The progress of the restore job can be monitored using the Job Controller.

NOTES


Change Account for Executing Pre/Post Commands (Data Protection)

Required Capability: See Capabilities and Permitted Actions

To change a user account for executing pre/post commands for Data Protection jobs:

  1. From the CommCell Browser, expand the tree to view the appropriate level icon for the affected agent.
  2. From the Subclient Properties dialog box, create and/or configure the subclient as appropriate. Then click the Pre/Post Process tab.
  3. From the Pre/Post Process tab, click Change.
  4. From the User Account dialog box, select one of the account options. If you select Impersonate User, type the appropriate user name and password.
  5. Click OK to save the settings.

Change Account for Executing Pre/Post Commands (Data Recovery)

Required Capability: See Capabilities and Permitted Actions

To change a user account for executing pre/post commands for Data Recovery jobs:

  1. From the CommCell Browser, expand the tree to view the appropriate level icon for the affected agent. Then right-click the icon and click All Tasks from the short-cut menu.
  2. Click the appropriate Browse or Restore option. Then populate, select, and click as appropriate to access the Restore Options dialog box.
  3. From the Restore Options dialog box, click Advanced.
  4. From the Advanced Restore Options, click the Pre/Post tab.
  5. From the Pre/Post tab, select one of the account options in the Pre/Post Impersonation area. If you select Impersonate User, type the appropriate user name and password.
  6. Click OK to save the settings.

Change Account for Executing Pre/Post Commands (Recovery Points)

Required Capability: See Capabilities and Permitted Actions

To change a user account for executing pre/post commands for creating Recovery Points on Windows:

  1. From the CommCell Browser, expand the tree to view the Replication Set for the affected ContinuousDataReplicator agent.
  2. Right-click the appropriate Replication Set and select Properties.
  3. In the Replication Set Properties dialog box, select the Pre/Post Process tab.
  4. From the Pre/Post Process tab, click Change.
  5. From the User Account dialog box, select one of the account options. If you select Impersonate User, type the appropriate user name and password.
  6. Click OK to save the settings.

Configure a Command Delay for a Pre/Post Process on NetWare/NDS Computers

Before You Begin

Required Capability: Capabilities and Permitted Actions

To configure a command delay for a pre/post process for NetWare/NDS iDataAgents:

  1. Locate the GALAXY.INI file in the directory where the iDataAgent was installed on the NetWare server, (e.g., SYS:\<Software Installation Path>).
  2. Open the GALAXY.INI file and at the very end of the file, create a new section by typing [Command Delay].
  3. Under this new heading, define all delays by typing the full path of the file to be executed for each corresponding pre/post process. Ensure that the full correct path is placed here by retrieving the path from the Pre/Post Process tab of the subclient's properties, (e.g., SYS:\PrePost\PreScan.ncf).
  4. After each full path, specify the number of seconds to delay the process before continuing, (i.e., SYS:\PrePost\PreScan.ncf=60). With this entry, whichever pre/post process has this path defined in the subclient's properties will be delayed for 60 seconds before continuing.
  5. Save all changes to GALAXY.INI, and close the file.

Configure a Replication Set for Pre/Post Processes for Recovery Point Creation

Before You Begin

Required Capability: Capabilities and Permitted Actions

To configure a Replication Set for Pre/Post processes for Recovery Point creation:

  1. In the CommCell Browser, right-click the Replication Set for which you want to configure a pre/post process, then click Properties from the shortcut menu.
  2. In the Properties dialog box, click the Pre/Post Process tab.
  3. Click inside the space that corresponds to one of the following phases and type the full path of the process that you want executed during that phase. Alternatively, click Browse to locate the process (applicable only for paths that do not contain any spaces).
  4. In the User Account dialog box, select Use Local System Account, or select Impersonate User and enter a user name and password. Click OK.
  5. Click OK to save your changes and close the Pre/Post Process tab of the Properties dialog box.

Configure a Subclient for Pre/Post Processing of Data Protection/Archive Operations

Before You Begin

Required Capability: Capabilities and Permitted Actions

To configure a subclient for Pre/Post processing of data protection/archive operations:

  1. From the CommCell Browser, right-click the subclient for which you want to configure a pre/post process, and then click Properties from the shortcut menu.
  2. Click the Pre/Post Process tab of the Properties dialog box.
  3. For an agent other than the Oracle RAC iDataAgent, click inside the space that corresponds to one of the following phases and type the full path of the process that you want executed during that phase. Alternatively, click Browse to locate the process (applicable only for paths that do not contain any spaces). For the Oracle RAC iDataAgent, click Browse for the corresponding process, click the name of the control node client in the Select Client for Browse dialog box, and click OK. Then browse for and click the process.

    Click OK.

  4. If you want to run a Post Process for all attempts to run that job phase, then select the corresponding checkbox.
  5. For subclients on Windows platforms, if Run As displays Not Selected, or if you want to change the account that has permission to run these commands, click Change.
    1. In the User Account dialog box, select Use Local System Account, or select Impersonate User and enter a user name and password. Click OK.
    2. If you selected Local System Account, click OK to the message advising you that commands using this account have rights to access all data on the client computer.
  6. Click OK to save your changes and close the Pre/Post Process tab of the Properties dialog box.

Configure Pre/Post Binding Scripts for the Quick Recovery Agent

Before You Begin

Pre/post scripts can be added to the QR Agent for both the Windows and Unix platforms by following the instructions below.

Adding a Pre-binding Script

A pre-binding script will execute after the snapshot has been created, but before the copy is initiated.

To add a pre-binding script:

  1. Create a script file that ends whatever applications and/or services that are preventing the QR Agent from locking the destination volume.
  2. Rename this script file to <subclient name>_prelock.bat.

    For example, for the subclient sub1, you would rename the script file to sub1_prelock.bat.

  3. Copy this script into the ../<software installation path>/Base folder of the client controlling the destination volume.

 

Adding a Post-binding Script

A post-binding script will execute after the volume is locked. The primary purpose of a post-binding script is to restart any applications and/or services that were stopped with a pre-binding script.

To add a post-binding script:

  1. Create a script file that re-starts whatever applications and/or services that were stopped with a pre-binding script.
  2. Rename this script file to <subclient name>_postlock.bat.

    For example, for the subclient sub1, you would rename the script file to sub1_postlock.bat.

  3. Copy this script into the ../<software installation path>/Base folder of the client controlling the destination volume.

Configure Pre/Post Snapshot Scripts for the Windows File System iDataAgent

Before You Begin

To add pre/post snap scripts to a subclient using the Windows File System iDataAgent, follow the instructions below.

Adding a Pre-snap Script

A pre-snap script will execute before the snapshot.

To add a pre-snap script:

  1. Create a script file for whatever you want to happen before the snapshot is taken.
  2. Rename this script file <subclient name>_presnap.bat.

    For example, for the subclient sub1, you would rename the script file sub1_presnap.bat.

  3. Copy this batch file into the ../<software installation path>/Base folder of the client.

 

Adding a Post-snap Script

A post-snap script will execute after the volume is snapped.

To add a post-snap script:

  1. Create a script file for whatever you want to happen after the snapshot is taken.
  2. Rename this script file <subclient name>_postsnap.bat.

    For example, for the subclient sub1, you would rename the script file sub1_postsnap.bat.

  3. Copy this batch file into the ../<software installation path>/Base folder of the client.

Create Pre/PostBackup Process Scripts to Back up VMware Virtual Machines Using the Linux File System iDataAgent

Required Capability: Capabilities and Permitted Actions

To create Pre/PostBackup process scripts to back up VMware virtual machines using the Linux File System iDataAgent:

  1. In the PreBackup script, include for each virtual machine the appropriate /usr/bin/vmware-cmd addredo command provided by VMware. Each command will create the required REDO file. REDO files will allow the system to back up the virtual machine files.

    The command syntax is:

    /usr/bin/vmware-cmd <Path-to-vmx-config-file> addredo <disk_device>

    where:

    <Path-to-vmx-config-file> is the path to the virtual machine configuration file
    addredo – instructs VMware to create the REDO file
    <disk_device> – is the virtual device node name.

    For example, PreBackup process script /root/scripts/Pre-VM-bkup.sh might include the following commands.

    /usr/bin/vmware-cmd /root/vmware/winNetEnterprise/winNetEnterprise.vmx addredo scsi0:0
    /usr/bin/vmware-cmd /root/vmware/rhas3/linux.vmx addredo scsi0:0
    /usr/bin/vmware-cmd /root/vmware/netware6/netware6.vmx addredo scsi0:0

  2. In the PostBackup script, include for each virtual machine the appropriate /usr/bin/vmware-cmd commit command provided by VMware. The commands in this script will post the data in the REDO files back to the virtual machine files, making the virtual machines active again. The REDO files will then be deleted.

    The command syntax is:

    /usr/bin/vmware-cmd <Path-to-vmx-config-file> commit <disk_device>

    where:

    <Path-to-vmx-config-file> is the path to the virtual machine configuration file
    commit – instructs VMware to post the data in the REDO files back to the virtual machine file, making them active again
    <disk_device> – is the virtual device node name.

    For example, PostBackup process script /root/scripts/Post-VM-bkup.sh might include the following commands.

    /usr/bin/vmware-cmd /root/vmware/winNetEnterprise/winNetEnterprise.vmx commit scsi0:0
    /usr/bin/vmware-cmd /root/vmware/rhas3/linux.vmx commit scsi0:0
    /usr/bin/vmware-cmd /root/vmware/netware6/netware6.vmx commit scsi0:0


Remove a Process from Pre/Post Processing of Data Protection/Archive Operations

Before You Begin

Required Capability: Capabilities and Permitted Actions

To remove a process from Pre/Post processing of data protection/archive operations:

  1. From the CommCell Browser, right-click the subclient for which you want to remove a pre/post process, and then click Properties from the shortcut menu.
  2. Click the Pre/Post Process tab of the Subclient Properties dialog box.
  3. Click the text inside the space that corresponds to one of the following phases for which you want a pre/post process removed, then press the Delete key:
  4. Repeat Step 3 for any additional processes that you want to remove.
  5. Click OK.

Back To Top