4 Unison
You need to install Unison on both systems. Unison is a great tool to perform incremental backup so that only new or
modified files are backed up. Unison can also mirror file removal.
aptitude install unison
On the back up server, log in as moo and create a subfolder ~/.unison. In there, edit a file called moodle.prf, and specify
the following lines:
root = /home/moo/backup # local dir
root = ssh://moodle@server// # remote dir
path = etc/apache2/conf.d/moodle # save web server config for Moodle
path = etc/cron.d/moodle # save cron job config for Moodle
path = etc/moodle # Moodle specific files go here
path = var/lib/moodle # the BULK of Moodle related files (classes, etc.)
path = home/moodle # optional, only if something special is here
path = usr/share/moodle # only if Moodle is customized, back up the source
ignore = Path var/lib/moodle/backups
ignore = Path home/moodle/.unison
Then, create a subfolder ~/backup. You also need to create all the subfolders for each path = line in
moodle.prf.
You can then run Unison manually:
unison -batch moodle