Tuesday, September 13, 2016

Incremental backups with rsync

Here's a simple example of how to use rsync(1) to update a backup directory. This will copy any new files based on timestamp (not checksum) and remove any files that are no longer in the original directory:
# rsync -avh --stats --delete /home/username/data/ /backup/home/user/data/
Note that different versions of rsync(1) may treat the last forward slash in either paths differently. Some require it, some don't. Make sure to check first.

No comments:

Post a Comment