Created On:  09 October 2012

Problem:

Automated Backup script for CaliberRM data using Versant 64-bit database.

Resolution:

The script below can be used to automatically backup the CaliberRM database when using the 64-bit version of Versant:

 

<<<<<<<<<<<<<<<<<< Script Start >>>>>>>>>>>>>>>>>>>>>>

 

@Echo off 

REM ****************************************

REM Backup CaliberRM Database – Versant x64

REM ****************************************

 

REM Take backup of profile

copy C:\Versant\DB\SQMDB\profile.be C:\CaliberRM_Backup 

 

REM Stop CaliberRM Services

"C:\CaliberRMStart\ConsoleCaliberRMStop.exe"

 

REM Wait 10 seconds 

@ping -n 10 localhost> nul 

 

REM Start Versant DB Services

"C:\CaliberRMStart\ConsolePartialCaliberRMStart.exe"

 

REM Wait 10 seconds 

@ping -n 10 localhost> nul 

 

REM Backup Database  

C:\Versant\7_0_1\bin\vbackup -dev C:\CaliberRM_Backup\SQMDB%date:~-4,4%%date:~-7,2%%date:~0,2%.bak -backup SQMDB 

 

REM Wait 10 seconds

@ping -n 10 localhost> nul 

 

REM Start all CaliberRM Services

"C:\CaliberRMStart\ConsoleCaliberRMStart.exe"

 

<<<<<<<<<<<<<<<<<< Script End >>>>>>>>>>>>>>>>>>>>>>

 

Attached to this article you will find the ConsoleCaliberRMStop.exe, ConsolePartialStart.exe and ConsoleCaliberRMStart.exe referenced in the script. There is also a config.ini which is needed for the aforementioned executables.

 

Setting up the backup script:

1.       Unzip the attached CaliberRMStart.zip to the root of your C:\ drive (this can be unzipped to any drive or location)

2.       Open the config.ini and make sure that paths to the 32-bit Versant install (packaged with CaliberRM server) and new 64-bit install are correct

3.       Copy the script above into a new .bat file (making sure that the paths to the stop/start utilities, vbackup command and backup location are all correct for your environment)

4.       Create a Windows scheduled task to run each night using the batch file created at step 3

 

n/a