Following the guide set out here I have installed zbackup on both the mail server and remote store server.
On the mail server, there is a wrapper script that tar’s up the vmail directory using a password file and creates a datestamped backup file
/bin/tar c /var/vmail | /bin/zbackup --password-file ~/.zbackup_password backup /home/zbackup/backups/backup-`date '+%Y-%m-%d'`
The wrapper script then rsync’s that across to the remote store via shared keys;
/bin/rsync -avz /home/zbackup/ zbackup@remote.server:/home/zbackup/gateway/
It also removes files older than 28 days;
find /home/zbackup/backups -mtime +28 -exec rm -rf {} \;
and runs garbage collection afterwards;
/bin/zbackup gc --password-file ~/.zbackup_password /home/zbackup
The script is run from cron every night @0150.
On the owncloud server, a similar script runs from the zbackup home directory that scans through owncloud data directories and backs them up. Again, the script is run as root