000015245 - AM 7.1sp3 (or higher) on Windows - script sample to automate backups

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000015245
IssueAM 7.1 for Windows - script sample to automate backups
Beginning with sp3, backups may be scripted and subsequently automated using the windows task scheduler. Here is a script sample that demonstrates how to approach this.
Resolution1) You must first turn off the password prompt for the backups.  This functionality was first introduced in sp3.   Note this sample uses the default installation path, adjust to your specific install path

c:\program files\RSA Security\RSA Authentication Manager\utils> rsautil manage-backups --action disable-pwd-prompt
<enter master password when prompted>

Note: step 1 only needs to be executed once.

2) create a script similar to the one provided below in $AMHOME\utils directory.  You can call it anything you want, but it has to have a .bat extension to execute in windows. The script will create a backup file is called <todays date>backup.dmp in the c:\backups directory.  You may modify this to suit your environment. Since you must use unique filenames for each backup, date stamping the backup file name in this mannor serves 2 functions: it creates a unique file name per backup, and creating a file that includes a datestamp name provides the date when the backup was snapped.  You may also want to consider purging the oldest backups periodically.  An average backup is approximately 200 mb, but that can vary dependent on the size of your installation.

#-----------------------begin script----------------------------------------
@echo off

REM Set Date format
FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B
FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B
FOR /F "TOKENS=1,2 DELIMS=/ eol=/" %%A IN ('echo %CDATE%') DO SET dd=%%B
FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B
SET date=%yyyy%%mm%%dd%
set filename=%date%backup.dmp
echo %filename%
rsautil manage-backups --action export -f c:\backups\%filename%.dmp
#---------------------------end script-------------------------------------------------------------

3) Schedule the job using 2003 Microsoft task scheduler referencing this article

http://support.microsoft.com/kb/814596

...Or 2008 Microsoft task scheduler

http://msdn.microsoft.com/en-us/library/bb756979.aspx

NotesFor Linux (non-appliance) and Solaris, see solution a54858
Legacy Article IDa54732

Attachments

    Outcomes