Configuring Pre- and Post-Processing Scripts Using VMware Tools

You can use VMware tools to perform specific operations before or after a backup. For example, if a virtual machine hosts an Oracle database and you want to enable a Hot backup of the database before performing a backup, you can run a script using VMware tools.

By default, custom quiescing scripts for Linux are stored in /etc/vmware-tools/backupScripts.d/. If that directory does not exist or is empty, the system runs any scripts that are in the legacy directory of C:Windowspre-freeze-script.bat on Windows and /usr/sbin/pre-freeze-script on Linux. For more information, see Running custom quiescing scripts inside Windows & Linux virtual machines (1006671).

Note

For ESX version4.x, store the VMware tools scripts in C:\Program Files\VMware\VMware Tools\backupScripts.d.

The following scripts are available to perform pre- or post-processing using VMware tools:

Operation

Procedure

Scripts

Scripts can be used to take a snapshot of a VM with the DB2 application. These scripts enable VMware to suspend I/O updates to the DB2 database until the VMware Linux guest snapshot is completed.

  1. On a Linux virtual machine, copy the pre-freeze-script and post-thaw-script to the /usr/sbin directory.

  2. Copy the write_suspend and write_resume scripts to a location where the DB2 database can execute them (preferably to a directory under DB2 home).

pre-freeze-script

post-thaw-script

write_resume.sh

write_suspend.sh

Scripts can be used to take a snapshot of a VM with the MAXDB application. These scripts enable VMware to suspend I/O updates to the MAXDB database until the VMware Linux guest snapshot is completed.

  1. On a Linux virtual machine, copy the pre-freeze-script and post-thaw-script to the /usr/sbin directory.

  2. Copy suspend_logwriter and resume_logwriter scripts to a location where MAXDB database can execute them (preferably to a directory under MAXDB home).

pre-freeze-script

post-thaw-script

resume_logwriter.sh

suspend_logwriter.sh

Scripts can be used to take a snapshot of a VM with the Oracle application. These scripts enable VMware to suspend I/O updates to the Oracle database until the VMware Linux guest snapshot is completed.

  1. On a Linux virtual machine, copy the pre-freeze-script and post-thaw-script to the /usr/sbin directory.

  2. Copy the pre-freeze-script.sql and post-thaw-script.sql scripts to a location where the Oracle database can execute them (preferably to a directory under Oracle home).

    These scripts change the entire database to backup mode.

    If the virtual machine has the Oracle iDataAgent installed on it, you can also use the consistent-archivelog-backup.rman script as a sample to run archivelog backup. This script gets a consistent snapshot, all the latest archived logs, and the current control file.

pre-freeze-script

post-thaw-script

pre-freeze-script.sql

post-thaw-script.sql

consistent-archivelog-backup.rman

Scripts can be used to take a snapshot of a VM with the Sybase application. These scripts enable VMware to suspend I/O updates to the Sybase database until the VMware Linux guest snapshot is completed.

  1. On a Linux virtual machine, copy the pre-freeze-script and post-thaw-script to the /usr/sbin directory.

  2. Copy pre-freeze-script.sql and post-thaw-script.sql scripts to a location where the Sybase database can execute them (preferably to a directory under Sybase home).

    These scripts execute Sybase quiesce commands that stop updates to the databases.

pre-freeze-script

post-thaw-script

pre-freeze-script.sql

post-thaw-script.sql

Scripts can be used to take a snapshot of a VM with the MySQL application. These scripts enable VMware to suspend I/O updates to the MySQL database until the VMware Linux guest snapshot is completed.

  1. On a Linux virtual machine, copy the pre-freeze-script and post-thaw-script to the /usr/sbin directory.

  2. Copy the quiesce.py and unquiesce.py scripts to a location where the MySQL database can execute them (preferably to the /usr/sbin directory).

    A Python script is used to quiesce and unquiesce the databases. Python and MySQL-Python modules must be installed on the client computer.

pre-freeze-script

post-thaw-script

unquiesce.py

quiesce.py

Scripts can be used to take a snapshot of a VM with the MongoDB application. These scripts enable VMware to suspend I/O updates to the MongoDB database until the VMware Linux guest snapshot is completed.

  1. On a Linux virtual machine, copy the pre-freeze-script and post-thaw-script to the /usr/sbin directory.

  2. Copy the quiesce.sh and unquiesce.sh scripts to a location where the MongoDB database can execute them (preferably to the /opt/cv_mongodb_snap directory).

    A shell script is used to quiesce and unquiesce the server.

    The cv_mongodb_properties file under /opt/cv_mongodb_snap must have the parameters mentioned if applicable. Logging information will be in the file /opt/cv_mongodb_snap/logfile.

Note

To disable automatic fall back of a non-quiesced snapshot, set the requireSnapshotGuestFileSystem additional setting to true. For instructions about adding an additional setting from the CommCell Console, see Adding an Additional Setting from the CommCell Console.

pre-freeze-script

post-thaw-script

unquiesce.sh

quiesce.sh

Scripts can be used to take a snapshot of a VM with the Informix application. These scripts enable VMware to suspend I/O updates to the Informix database until the VMware Linux guest snapshot is completed.

  1. On a Linux virtual machine, copy the pre-freeze-script and post-thaw-script to the /usr/sbin directory.

  2. Make sure to modify the Informix specific environmental variables defined in both the scripts to match your server.

pre-freeze-script

post-thaw-script

Loading...