Views:

Summary



In cases where application consistent backups on the virtual machine are required, users can create custom scripts which will run before a virtual machine is snapshotted or after the virtual machine Snapshot is completed. In a Windows environment, if your application supports VSS, the Snapshot job triggers the VSS application quiesce logic if the Quiesce VM file system and applications" option is enabled when defining the DPX Agentless backup job. However, for applications that don?ÇÖt support VSS, or on Linux virtual machines, pre and post Snapshot scripts can be used to quiesce your application for the Snapshot backup. The scripts, when placed in the suggested locations, trigger automatically during DPX Agentless backup via VMware tools. Note: Catalogic Software Support does not debug or implement any scripts. DPX simply provides infrastructure to submit user defined scripts"

Resolution



Creating scripts in a Linux environment:

Create the scripts in the following locations inside the Linux virtual machine:

/usr/sbin/<pre-freeze-script>

/usr/sbin/<post-thaw-script>

Both files must have read, write, and execute permissions so that they are executable, and should be owned by root. The scripts must return a return code of 0, or the virtual machine Snapshot will fail.

Creating scripts in a Windows environment:

Instructions and examples are provided in the following VMware knowledge base article:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006671

 

Example scripts for an Oracle backup in a Linux environment:

The example scripts below detail how the pre-script and post-script capabilities can be implemented in a specific scenario in which an Oracle backup is being run on a Linux machine.

/usr/sbin/pre-freeze-script

#!/bin/sh

su – oracle <<EOF

export ORACLE_SID=”db1”

sqlplus “/as sysdba” <<END

whenever sqlerror exit1

alter system archive log current;

alter database begin backup; END

EOF

/usr/sbin/post-thaw-script

#!/bin/sh su

– oracle <<EOF

export ORACLE_SID=”db1”

sqlplus “/as sysdba” <<END

whenever sqlerror exit1

alter database end backup;

alter system archive log current;

END

EOF

Ensure the archive log destination is kept on a separate NFS share as the archive logs generated during the Snapshot phase must be available during recovery. The Snapshot itself does not contain the archive logs.

In an Oracle recovery scenario, first perform an Agentless recovery, then review the procedure in the following Oracle document:

http://docs.oracle.com/cd/A84870_01/doc/server.816/a76993/performi.htm#15938