Automated Backups for Beacon Endpoint Profiler
The Great Bay Beacon Endpoint Profiler 2.1.8 has a number of options for backups. Backups are automatically run daily and manual backups can be run from the command line from the web based GUI. The files can be manually downloaded, but the backup files are not be automatically moved to a remote location. Below is a simple shell script that automatically backups the Profilier database and the cron job that schedules the shell script to run daily. The cron job entry is in bold.
$ cat bugs3.sh
time=`date +%Y%m%d_%H%M_%S`
pg_dump | gzip > /home/beacon/backups/beaconbackup-$time.gz
ftp -n -i -v <<EOD
open XXX.XXX.XXX.XXX
user username password
put /home/beacon/backups/beaconbackup-$time.gz /usr/local/backup/Beacon/beaconbackup-$time.gz
EOD
$ cat bugs3.sh
time=`date +%Y%m%d_%H%M_%S`
pg_dump | gzip > /home/beacon/backups/beaconbackup-$time.gz
ftp -n -i -v <<EOD
open 128.249.XXX.XXX
user appliance password
put /home/beacon/backups/beaconbackup-$time.gz /usr/local/backup/Beacon/beaconbackup-$time.gz
EOD
[beacon@Beacon ~]$ crontab -e
*iMAILTO=”"
# Check once a minute for stopped/dead components
*/1 * * * * cd /usr/beacon; /usr/beacon/beacon resurrect
# Perform working file clean up every hour
0 */1 * * * find /usr/beacon/pending -maxdepth 1 -type f -mmin +120 -delete;
0 */1 * * * find /usr/beacon/pending -name *.xml -mmin +120 -delete;
0 */1 * * * find /usr/beacon/working -name *.xml -mmin +120 -delete;
0 */1 * * * find /usr/beacon/working/cca -name *.dump -mmin +120 -delete;
# Perform ongoing maintain every two hours
0 */6 * * * /usr/beacon/sql/vacuum-switch.sh va-all
15,45 * * * * /usr/beacon/sql/vacuum-switch.sh 15min
1,30 * * * * /usr/beacon/sql/vacuum-switch.sh 30min
30 */2 * * * /usr/beacon/sql/vacuum-switch.sh history
# Perform daily DB backups
0 3 * * * /usr/beacon/sql/db_backup.sh
0 4 * * * /home/beacon/bugs3.sh
# For HA maintenance. No-op if not in HA mode
*/1 * * * * /usr/beacon/sql/chk_status_master.sh
# For HA maintenance. No-op if not in HA mode
*/3 * * * * /usr/beacon/sql/check_slon.sh
1,31 * * * * /usr/beacon/sql/check_confirm.sh
