Views:

Summary



This article provides information on how to configure Catalogic Software data protection software for protecting Pervasive SQL database servers. Note that the description here illustrates a protection method that relies on a vendor supplied binary. Catalogic Software does not directly support application interfaces to coordinate application-consistent backup of Pervasive SQL. The methodology described here uses a vendor supplied binary, and only describes how this binary can be automated in a backup job to quiesce and back up data. Any questions relating to backup, transaction logs, data recovery, or Pervasive SQL best practices should be directed to Actian Corporation www.actian.com/.

Resolution



Actian Corporation provides a product called "Backup Agent" which is tailored specifically to assist with quiescing and protecting Pervasive SQL databases. There are separate 32-bit and 64-bit binaries available called pvbackup.exe and pvbackup64.exe respectively. For purposes of example here, we will use pvbackup.exe. Substitute as necessary for the appropriate platform.

Catalogic Software data protection uses several methods to quiesce applications by using pre/post-scripts for snapshots. The pre/post-script facility automates a script triggered to occur right before VSS snapshot, right after VSS snapshot, and right after data transfer is complete. For application interfaces that Catalogic Software does not directly support, it is common to use pre/post snapshot scripts which will quiesce the application, perform the VSS snapshot, and then resume the application back to normal activity. In many cases, this pre/post snapshot facility is used to stop the application, snapshot the data in "cold backup" mode, and then bring the application up again. In the case of Pervasive SQL, a vendor supplied binary is used to freeze the database files (with new activity being sent to transaction logs), perform the VSS snapshot, and then unfreeze the database files to resume normal activity. In either case, once the VSS snapshot is complete, the backup software is free to transfer that data while the application continues to serve data.

For a complete and general description of how pre/post snapshot scripting works, see the section Implementing Pre-Script and Post-Script for Snapshots Operations in the DPX User's Guide.

The pvbackup.exe command line syntax is straightforward:

  • pvbackup -on Freezes database files with new commits captured in transaction logs
  • pvbackup -off Returns database to normal operation
  • pvbackup -status Reports the current status of the Backup Agent software

You need to do the following:

  1. Install the Catalogic Software data protection software to your Pervasive SQL host.
  2. Create a script containing 'pvbackup -on' and any other necessary actions (for example pvbackupon.bat), and save this to the Catalogic Software 'sched\scripts' directory.
  3. Create a a script containing 'pvbackup -off' and any other necessary actions (for example pvbackupoff.bat), and save this to the Catalogic Software 'sched\scripts' directory.
  4. Following the section, Implementing Pre-Script and Post-Script for Snapshots Operations in the DPX User's Guide, create the required scrinfo.txt and save this script to the Catalogic Software 'bin' directory.

If your Catalogic Software backup job name is PVprotect, an example scrinfo.txt file might look like:

# Pervasive SQL backup agent on/off script
cmd=pvbackupon.bat<>type=presnap<>jobname=PVprotect<>abort_on_fail=1
cmd=pvbackupoff.bat<>type=postsnap<>jobname=PVprotect

As with any scripting or programming effort, it is strongly suggested to check and print accurate status messages for job log auditing and job control. Note that if error status is not checked and handled properly, it is possible that the expected result from the vendor supplied binary is not achieved, and the backup continues with live data that is not in a quiesced application-consistent state which later results in difficulty and failure at restore time. It is strongly suggested to use the 'pvbackup -status' command to check and print the database status, and to use the Catalogic Software 'bexit' binary to pass any failure status to the job for error processing. With the scrinfo.txt example above, the job will fail if the user supplied script returns an error status. Backup job failure in this case is preferred as the failure will be visible to the data protection engineer who can alert the application owner for corrective action. For more information on the use of 'bexit' for error code passing on Windows platforms, see the Pre-Scripts and Post-Scripts chapter in the Reference Guide (available for download from the MySupport site).

Using pre/post snapshot scripting along with Actian Corporation's Backup Agent software should result in a very brief period of time where the database files are frozen (read-only). According to the Backup Agent documentation, the Pervasive SQL database engine should remain active during this time and send any new commits to transaction logs, which will be flushed after the database files are unfrozen.

For additional details on placement of database files, transaction logs, and Pervasive SQL best practices for backup and recovery, please consult Actian Corporation's documentation and/or technical support.