000012655 - AM 7.1sp3 for Solaris or RedHat - sample script 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 Number000012655
IssueAM 7.1sp3 for Solaris or RedHat - sample script to automate backups
Beginning with sp3, backups may be scripted and subsequently automated using cron. Here is a script sample that demonstrates how to approach this.
ResolutionThe following example assumes you are using the default installation path, /usr/local/RSASecurity/RSAAuthenticationManager as $RSAHOME.  Modify to suit your environment as needed.

-Login to your unix machine as the account you run AM 7.1 under
-cd /usr/local/RSASecurity/RSAAuthenticationManager/utils
-execute the following command to disable master password required to perform backups
    ./rsautil manage-backups -a disable-pwd-prompt
    Enter master password: *********

You may now run backups from the command line without being prompted for a pw, but since the filename must be unique, you will need to write a simple  script something like below to create a unique filename for each backup, this is a sample:

#!/bin/bash
FILENAME=$(date +"%Y%m%d"_RSAbackup.dmp)
export FILENAME
/usr/local/RSASecurity/RSAAuthenticationManager/utils/rsautil manage-backups -a export -f /var/tmp/$FILENAME

That will make a file in /var/tmp (or wherever where you want to put it) called, if it was run on May 15, 2011, 20110514_RSAbackup.dmp

Place this script in the /usr/local/RSASecurity/RSAAuthenticationManager/utils directory and add execute permissions to it, for example

      chmod +x backupscript.sh

Note: if you do not place the script in the utils directory, you will recieve an exception and the log for the backup will not be created.  The backup will, however, run.

You should also consider a routine to periodically preen backups maybe 4 or 5 back, they are about 200mb each and you will not want to fill the file system up over time with an unattended directory of backups.

Then create a crontab that calls this script for the frequency which you wish to backup for the user you run AM under.  Consult the manpage for your specific unix implementation for specific instructions on using cron for your platform.
NotesFor windows, see solution a54732
Legacy Article IDa54858

Attachments

    Outcomes