Rough and Ready 10.4 Backup Script (version 1.2)
backup.sh
Version 3Show DocumentHide Document
Hi I have had some feedback on the script.
1) The script attempts to download a jar file from the internet. If the machine does not have access to the internet, then the script will need to be modified so that the Jar file can be obtained or is copied to the system.
The line is:
# Security Analytics Server Backup
echo 'Starting SA Server Backup'
stop jettysrv
wget http://repo1.maven.org/maven2/com/h2database/h2/1.3.172/h2-1.3.172.jar (this step can fail if there is no internet on the box and without this jar the next step will fail, hence no db backup)
cd /var/lib/netwitness/uax/db
java -cp h2-1.3.172.jar org.h2.tools.Backup -file jettydb.backup
mv jettydb.backup /$backuppath
cd /$backuppath
2) Incorrect Filename specified
#Echo Self Generated Certificate
cp /opt/rsa/jetty9/etc/keystore .
tar --atime-preserve --recursion -cvphjf saserver.tar.gz /var/lib/netwitness/uax/nodeSecret.* /var/lib/netwitness/uax/conf /var/lib/netwitness/uax/lib /var/lib/netwitness/uax/logs /var/lib/netwitness/uax/plugins /var/lib/netwitness/uax/scheduler /var/lib/netwitness/uax/security-policy
There is no file name nodeSecret.* as file name is just nodeSecret (no extension), this file is very critical to restore the encrypted data
This script will backup a 10.4 system and then copy it to a remote CIFS location. (You may need to run "yum install cifs-utils" for this functionality to work)
It will backup
- SA Configuration
- Public Keys used for File Log Collection event sources
- User Defined Certificates on the SA GUI