Application-consistent backups
You can create application-consistent backups if your application instance supports Windows Volume Shadow Copy Service (VSS) or if your application instance supports application quiescing.
Scenario 1: Your application instance runs on a Windows server, and it supports Windows Volume Shadow Copy Service (VSS)
When you take a backup of a virtual machine (VM), the application instance acts as a VSS requester. VSS automatically quiesces the application instance before the backup is taken and "un-quiesces" it afterwards, making the backup application-consistent. If the application instance is a database, you can roll it forward by replaying the database logs.
Scenario 2: Your application instance provides a means to be put in a storage-consistent state (that is, application quiescing).
For application instances that do not support VSS or for non-Windows applications, you can create an application-consistent backup with ThinkAgile CP by invoking a script that quiesces the application or puts it in a storage-consistent state. ThinkAgile CP provides the pre- and post-backup creation hooks to call such scripts.
Note
In scenarios outside of the two listed above, you will be creating a crash-consistent backup of the application, which is a point-in-time backup image. A point-in-time database backup cannot be rolled forward by replaying the database logs.
Invoke pre- and post-backup scripts
Windows pre-backup script:
C:\Program Files\tacp\Hooks\PreSnapshot.bat
Windows post-backup script:
C:\Program Files\ta\Hooks\PostSnapshot.bat
Linux pre-backup script:
/etc/tacp/hooks/pre-snapshot
Linux post-backup script:
/etc/tacp/hooks/post-snaphot
Example
To create an application-consistent backup for an Oracle database running on Linux, there is no VSS support. ThinkAgile CP can call your pre-backup script to put the database in a backup-consistent state by putting all tablespaces in backup mode, and then it can call your post-backup script to take them out of backup mode.
Example pre-backup script (which puts the tablespace in backup mode)
In the VM to be backed up, you can put the pre-snapshot script here:
/etc/tacp/hooks/pre-snapshot
sqlplus -s <admin>/<password> << EOF
set echo off;
set heading off;
alter database begin backup;
exit;
EOF
Example post-backup script (to return the database to a normal performance state)
/etc/tacp/hooks/post-snapshot
sqlplus -s <admin>/<password> << EOF
set echo off;
set heading off;
alter database end backup;
exit;
EOF