Backup Services
This section describes how the OpenVino servers are backed up using rsync:
Install rsync on all the servers:
[root@delta ~]# yum install rsync
alpha
root@alpha$ ssh-keygen -t rsa
root@alpha$ scp .ssh/id_rsa.pub root@foxtrot:.ssh/authorized_keys_alpha
root@foxtrot$ cat .ssh/authorized_keys_alpha >> .ssh/authorized_keys
Setup the crontab entry for root@alpha
0 3 * * * rsync -avH --delete /home/mbarrow root@foxtrot:/backups/alpha
0 4 * * * rsync -avH --delete /var/log root@foxtrot:/backups/alpha
10 5 * * * rsync -avH --delete /var/www root@foxtrot:/backups/alpha
25 5 * * * rsync -avH --delete /etc root@foxtrot:/backups/alpha
bravo
OpenBravo backup configurations
From the page http://wiki.openbravo.com/wiki/Installation/Appliance/Config#Synchronization_of_backups
To configure a backup policy follow these steps:
Edit the configuration file for backups
Set an schedule to perform the backups automatically
Synchronize copies of backups on different servers
Implement server redundancy.
Edit the configuration file to enable backups
Edit the file /etc/openbravo-backup.conf
# This should be <20GB of backups, and cover more than one monthly accounting period for Costaflores
Set an schedule to perform the backups automatically
Edit the openbravo crontab entry, to execute an automatic backup everyday at 08:00. Currently, the timezone set for bravo is CET, so the is equivalent to 03:00 or 04:00 in Argentina/Uruguay (depending on European summer time), and should be the least invasive time for this operation, though even if it was at 08:00 in South America, Mica Vera is not likely to be inputing data at that time.
Synchronize copies of backups on different servers
Having backups only on the local disk cannot safeguard against the worst problems. In case that this disk or the server breaks it is like not having any backups at all. By default OpenBravo includes methods for syncing with Amazon S3 and locally mounted storage (pen drives, secondary disks, etc.)
Rather than use either of these methods, we have opted to configure rsync to replicate the /backup directory to a secondary server
The essential command looks something like this:
rsync -avH --delete /backups/auto respaldo@
This command is executed on bravo as user "root" and will sync everything in the /backups/auto directory and system configuration directories to foxtrot:/backups/bravo
To setup this operation automatically, it is necessary to exchange pairs to eliminate the need to input the respaldo user password every time.
At this point, user root should be able to ssh (and rsync) to foxtrot without having to provide a password.
Finally, we can create a crontab entry for user respaldo on bravo to rsync automatically, every day at 9am (CET) the directories to foxtrot:
charlie
delta
echo
openvinopi