1
2
3
4
5
6
7
8
9
# from http://ask.slashdot.org/comments.pl?sid=2604202&cid=38589562

# First I sync from the remote directory to a local base directory:

rsync --partial -z -vlhprtogH --delete [email protected]:/etc/ /backup/server/www/etc/base/

#Then I sync that to the daily backup. Files that have not changed are hard-linked between all the days that share them. It very efficient and simple, and retrieving files is as simple as doing a directory search.

rsync -vlhprtogH --delete --link-dest=/backup/server/www/etc/base/ /backup/server/www/etc/base/ /backup/server/www/etc/2012-01-04