Expert GuideUsing pre- and postscripts for application-consistent backup in Spectrum Protect Plus

Oliver Ladage — 29. November 2021
Reading time: 2:20 minutes

Spectrum Protect Plus provides modern ways to protect VMWare-based virtual machines. This works reliably as long as no application is running on the virtual machine that cannot be stored consistently by a file system-based snapshot.

For example, relational database systems (RDBMS) that use transaction-based consistency within the application are affected by this limitation. These virtual machines are only protected crash consistently during the backup, i.e. in the same way as if the machine was powered off while running. This can cause database files to be inconsistent during a restore and prevent the application from starting.

 

To prevent the problem, Spectrum Protect Plus provides the ability to use a script (prescript) to put the application in a consistent state before backing up the virtual machine, or to trigger a backup of the application.

 

We have a new ERP system called Vertec. Vertec integrates as a total solution all processes of a CRM as well as ERP system and uses a Firebird database for this purpose. To ensure that the database is backed up consistently, a script with gbak must be executed on the Vertec server. This saves the database in the E:\ directory and moves the backup to the F:\ drive.

 

Now you can use IBM SPP to execute a PreScript for the backup. This way the backup of the database can be executed exactly before the backup of the VM. So you always have a backup of the database before the backup of the VM.

 

We received this script from the manufacturer and adapted it for us. This works on the Vertec server itself:

"E:\Program Files\Firebird 4.0\gbak.exe" -b 
"E:\Program Files\Vertec\DB\vertec.fdb" 
"F:\BackupDB\vertec.fbk" -user SYSDBA -password ****

We have stored this as a script in Spectrum Protect PLus under System Configuration.

Additionally the Spectrum Protect Plus needs a ScriptServer on which this script is executed. For this we have added the Vertec server, because the script should run on this server before the backup.

Then we created a new SLA in Spectrum Protect Plus for the Vertec server, because otherwise Spectrum Protect Plus would run the PreScript on all VMs and this might cause errors.

We added the new SLA to the Vertec VM.

When adding the SLA, we also added a user for file indexing under the "Agent Options" so that individual files can be restored.

Next, the "Policy Options" had to be adjusted in the SLA Policy Status for our SLA Gold_Vertec.

Here you should not forget to check first the PreScript box and only then select the script and the script server.

It would be advisable to also check the "Continue job/task on script error" box so that it still saves the VM in the event of a script error.

At the end save with Save.

Now you can do an ad hoc backup for the VM with the PreScript. In the backup you should now see that first the script is executed before the VM is backed up.

You were interested in this, then you may also be interested in...