Automating the UCSD internal DB Backup for a single node deployment:
The crontab entry
[root@localhost etc]# crontab -l
1 2 * * 0 /usr/local/etc/DB_BACKUP > /dev/null 2>&1
The Script on UCSD
[root@localhost etc]# cat /usr/local/etc/DB_BACKUP
# server login password localfile remote-dir
echo "open $1"
echo "user $2 $3"
upload_script $1 $2 $3 put $4 $5 | /usr/bin/ftp -i -n -p
if [ ! -f $BKFILE ]
echo "Backup failed. "
export NEWFILE="cuic_backup_`date '+%m-%d-%Y-%H-%M-%S'`.tar.gz"
doftpput $FTPSERVER $FTPLOGIN $FTPPASS $BKFILE $NEWFILE
nohup /opt/infra/startInfraAll.sh &
cut and paste above text
chmod +x /usr/local/etc/DB_BACKUP
set -o vi
Ideas for Multi Node Backup
(1) Enable SSH on all hosts with pub key from Inventory DB.
(2) Write a script in such a way that from Inventory, it shutdown all primary, service nodes (hardcoding the IPs)
(3) Invoke a local backup command on the inventory node and copy the backup to NFS
(4) Invoke a remote backup command on the monitoring node and copy the backup to NFS
(5) Start Service nodes, Primary nodes
Put this in a cron on Inventory node.
Another contribution by:
Alejandro Madurga Ainoza
Python scripts to stop the services on a multimode (single node work as well)
In this case customer wanted to store the backup on a server filesystem (that could be NFS mounted).
Scripts attached, they call the OOTB backup scripts but avoid the FTP steps.
Does UCSD DB backup and restore is enough for full UCSD restoration from scratch?
Yes it does. But the dB coming and going to has to match the ucsd version
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: