Simple differential backups using rdiff-backup

As a user I want to have differential backups of my documents and git directories from my computer at work to my remote off-site server.

Frequency of backups is one time a day at 1:00 AM.
Retention policy is to keep backups 12 months.

Install rdiff-backup on source computer and on destination server also.

apt-get install rdiff-backup

First you have to copy SSH public key from your source computer at work to remote server.


Edit crontab as a backup user on source computer.

crontab -e

00 1 * * *       rdiff-backup /data/documents 1> /dev/null
01 1 * * *       rdiff-backup /data/git 1> /dev/null
02 1 * * *       rdiff-backup --remove-older-than 12M --force 1> /dev/null
25 1 * * *       rdiff-backup --remove-older-than 12M --force 1> /dev/null

On remote server create destination directories and make sure user backup is owner of it.

mkdir /disk/backup/{documents,git}
chown backup /disk/backup/{documents,git}

From source computer run firs backup manually and check results on destination computer.

rdiff-backup /data/documents
rdiff-backup /data/git

Print Friendly, PDF & Email