Loading...

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.

On Linux virtual machines, the script /usr/sbin/pre-freeze-script is executed when the software snapshot is created and /usr/sbin/post-thaw-script is executed when the software snapshot is removed. Ensure that these scripts are executable by the VMware tools user.

For more information about running scripts on Windows virtual machines, refer to Running custom quiescing scripts inside Windows virtual machine with ESX 3.5 Update 2 and later (1006671).

Note: For ESX version4.x, the VMware tools scripts should be located 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.sh

post-thaw-script.sh

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.sh

post-thaw-script.sh

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 snap, all the latest archived logs, and the current control file.

pre-freeze-script.sh

post-thaw-script.sh

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.sh

post-thaw-script.sh

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.sh

post-thaw-script.sh

unquiesce.py

quiesce.py