Skip to content

Instantly share code, notes, and snippets.

@haad
Created July 1, 2013 21:19
Show Gist options
  • Save haad/5904725 to your computer and use it in GitHub Desktop.
Save haad/5904725 to your computer and use it in GitHub Desktop.
File level dedup with rsync
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment