Please see http://wiki.contribs.org/Affa for full documentation.Hi all,
for some time I use dedicated backup servers with huge RAID disks to backup all my SME server installations. I ran the rsnapshot programm and a few additional shell scripts to make it meet my requirements. Although it has been working well, there were some unsatisfactory points. I decided to redo it from the scratch as a standalone perl program without rsnapshot. My goal was to make a tool, which run reliable and unattended once it was setup.
The program itself is completed now. Documenation needs to be done and will be done soon. For those who are interested in now and don‘t want to wait for the docs, I have written a feature list and a tiny howto, which should be enough for a first try.
Affa features:
* Makes full backups with every scheduled run
* Keeps configurable number of scheduled, daily, weekly, monthly and yearly full backup archives
* Using rsync with optional compression for low traffic allows backups over the internet/VPN
* Uses hardlink technique, i.e. physical disk space only needed for the differences between two full backups
* Backup jobs are started by crond
* Backups the default e-smith directories/files with property SMEServer set to yes
* Additional directories/files can be included
* Directories/files can be excluded from the backup
* Non-SME server linuxes can be backuped by setting SMEServer property to no and using a include list
* Configurable nice level for rsync processes on backup and source server
* Optional run of custom programs before and after a job run (e.g. running tape backup)
* Checks the disk space left after a job run with warning levels strict, normal or risky
* Extensive checking of failure conditions
* Sends failure messages to a configurable list of email addresses
* Sends warning message, if the backup server run out of disk space
* Installs an optional watchdog on the source server for the case the backupserver fails
* Watchdog sends warning, if an expected backup did not run
* Watchdog sends a daily reminder message, if the error continues unchecked
* Option to display current status of all jobs showing times of last and next run
* Option to display reports of all stored backups shown size, tranferred volume, disk usage and more
* Report can be sent to the configured email addresses
* Option to send the public DSA key to the source server
* Option to rise the backup server to a production server from a backup. For SME only
* The rise option does not physically move data and therefore is extremly fast and needs no disk space
* Rise option can be run remotely as the ethernet drivers of the backup server are preserved
* Compares installed RPMs on source with backup server. Sends warning message, if not in sync
* Undo rise option to restore the backup server
* Configurable via a e-smith style db, with one record for each job and a default record for all jobs
* Logs in /var/log/affa with optional debug switch for high verbosity
* Log files are rotated weekly, with 5 logs kept
Installation and configuration mini-howto
Sample:
You have a SME 7 production server with hostname ‚prodbox‘ and IP 10.200.48.1.
Set up a second SME 7 box as your backupserver with hostname ‚affabox‘ and IP 10.200.48.2.
1) log into the ‚affabox‘, download the packages from
http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/affa/ and install them
2) generate the DSA keys and send the public key to the ‚prodbox‘
# affa --send-keys 10.200.48.1
3) copy the config helper script sample
# cp /usr/lib/affa/jobconfig-sample.pl /root/prodbox-job.pl
4) edit /root/prodbox-job.pl and set
my $jobname=‘prodbox‘;
and
'remoteHostName‘=>‘10.200.48.1‘,
This script is to ease the configuration. You could also do the config it using the ‚db affa‘ command.
5) run the config script
# /root/prodbox-job.pl
6) installing the cron job
# affa --make-cronjobs
7) run the job manually (or wait until 10:30 pm)
# affa --backup prodbox
8) view the log
# tail -f /var/log/affa
9) View the status
# affa --status
10) View the report
# affa --report
11) View the backup archive
cd /var/affa/prodbox/schedule.0/