Loading...

Pre and Post Processes - Advanced

Table of Contents

Add Pre and Post Commands to Restore Jobs

Use the following steps to perform a pre and post process after a restore operation:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent> | <BackupSet>.
  2. Right-click the <Subclient> in the right pane, then click Browse and Restore.
  3. Click View Content.
  4. Select the data that you want to restore and click Recover All Selected.
  5. Click Advanced, then click the Pre/Post tab.
  6. Enter the path for the batch file in the Pre Recovery Command box or click Browse to select the batch file.
  7. Enter the path for the batch file in the Post Recovery Command box or click Browse to select the batch file. Select one of these options:
    • Use Local Accounts - Select if the local account has permissions to execute the processes on the destination client.
    • Impersonate User - Select, then enter the username and password that has the permissions to execute the processes on the destination client.
  8. Click OK.
  9. Click OK to start the restore.

    If a Job has been scheduled, Pre/Post processing commands cannot be added or removed from the restore operation. To change the Pre/Post processing commands of a restore operation, the operation must be cancelled and rescheduled as described above.

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

You can configure to use a different account with permissions to execute the Pre/Post Processes on Destination clients for Data Protection Operations. Use these steps to change the account:

Note: The option to change the account to run the Pre/Post processes is available only on the Windows client.

  1. From the CommCell Console, navigate to Client Computers | File System | <BackupSet> | <Subclient>.
  2. Right-click the subclient and click Properties.
  3. Click the Pre/Post Process tab and click Change and select one of the following options within the User Account dialog box:
    • Use Local System Account - Select this option if the local account has permissions to execute the processes on the destination client.
    • Impersonate User - Select this option and enter the username and password for an account that has the permissions required to execute the processes on the destination client.
  4. Click OK to save the settings.

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

You can configure to use a different account with permissions to execute the Pre/Post Processes on Destination clients for Data Recovery Operations. Use the following steps to changes this account:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent> .
  2. Right-click a Backup Set and click All Tasks | Browse and Restore.
  3. Click View Content.
  4. Select the data that you want to restore and click Recover All Selected.
  5. From the Restore Options dialog box, click Advanced.
  6. From the Advanced Restore Options, click the Pre/Post tab.
  7. From the Pre/Post tab select one of the following options:
    • Use Local Accounts - Select this option if the local account has permissions to execute the processes on the destination client.
    • Impersonate User - Select this option and enter the username and password, that has the permissions to execute the processes on the destination client.
  8. Click OK to save the settings.
  9. Click OK to start the restore.

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

You can configure to use a different account with permissions to execute the Pre/Post Processes on Destination clients for Replication Sets. Use the following steps to changes this account:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | ContinuousDataReplicator | ReplicationSet.
  2. Right-click the 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 and select one of the following options:
    • Use Local Accounts - Select this option if the local account has permissions to execute the processes on the destination client.
    • Impersonate User - Select this option and enter the username and password, that has the permissions to execute the processes on the destination client.
  5. Click OK to save the settings.

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

Use the following steps to configure a replication set for Pre/Post processes for Recovery Points creation:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | ContinuousDataReplicator | ReplicationSet.
  2. Right-click the Replication Set and select Properties.
  3. In the Replication Set Properties dialog box, select the Pre/Post Process tab.
  4. 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).
    • Pre-Recovery Point Command
    • Post-Recovery Point Command
  5. Select one of the following options from the User Account dialog box:
    • Use Local Accounts - Select this option if the local account has permissions to execute the processes on the destination client.
    • Impersonate User - Select this option and enter the username and password, that has the permissions to execute the processes on the destination client.
  6. Click OK to save your changes and close the Pre/Post tab of the Properties dialog box.

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

You can add and modify Pre/Post processes for a subclient. These are batch files or shell scripts that you can run before or after certain job phases.

  1. From the CommCell Console, navigate to Client Computers | File System | Backup Set | Subclient.
  2. Right-click the subclient and click Properties.
  3. Click the Pre/Post tab of the Properties dialog box.
  4. Click Browse to locate the process (applicable only for paths that do not contain any spaces).

    Alternatively, you may click inside the space that corresponds to one of the phases and type the full path of the process that you want executed during that phase.

    If you want to run a Post Process for all attempts to run that job phase, then select the corresponding checkbox.

    Click OK.
  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 and select one of the following.
    • Use Local Accounts - Select this option if the local account has permissions to execute the processes on the destination client.
    • Impersonate User - Select this option and enter the username and password, that has the permissions to execute the processes on the destination client.
  6. Click OK to save your changes and close the Pre/Post tab of the Properties dialog box.

Configure Pre and Post Hardware Snapshot Scripts for the Windows File System Agent

Pre/post snap scripts can be added to a subclient using the Windows File System iDataAgent. A pre-snap script executes before the hardware snapshot and a post-snap script executes after the volume is snapped.

Add a pre-snap script

  1. Create a script file containing the processes to complete before the hardware snapshot is taken.
  2. Rename this script file SubclientName_presnap.bat.

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

  3. Copy this batch file into the ../software_installation_path/Base folder of the client.

Add a post-snap script

  1. Create a script file containing the processes to complete after the hardware snapshot is taken.
  2. Rename this script file SubclientName_postsnap.bat.

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

  3. Copy this batch file into the ../software_installation_path/Base folder of the client.

Create Pre and Post Backup Process Scripts to Back Up Virtual Machines Using the Linux File System Agent

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 and Post Processing of Data Protection or Archive Operations

  1. From the CommCell Console, navigate to Client Computers | File System | Backup Set | Subclient.
  2. Right-click the subclient and click Properties.
  3. Click the Pre/Post tab of the Properties dialog box.
  4. Remove the text inside the space that corresponds to one of the phases for which you want a pre/post process removed.
  5. Click OK.

Setting Up Post Processes to Run During Failures

By default, a specified post process command is executed only on successful completion of the scan or backup operation or if the job is killed.

Use the following steps to run a post process even if the scan or backup operation did not complete successfully. For example, this may be useful to bring a database online or release a snapshot.

Procedure

  1. From the CommCell Browser, navigate to Client Computers | <Client> | File System | Backup Set.
  2. Right-click the <Subclient> in the right pane, and then click Properties.
  3. Click the Pre/Post Process tab.
  4. Select  the Run Post Scan Process for all attempts check box.
  5. Select the Run Post Backup Process for all attempts check box.
  6. Click OK.