|Issue||AM 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.
|Resolution||The 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
-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:
/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.
|Notes||For windows, see solution a54732|
|Legacy Article ID||a54858|