Re: copy only files that have changed?
Originally Posted by
papibe
This is how it works:
It all start by making a full backup (or mirror) of your source directory. If you do a regular rsync again, you would update the destination, but the previous version of the backup-ed data would be overwritten.
Another approach is to do a differential backup: leave the full backup intact, and create a new directory with only the content that has change on the source.
A typical rsync implementation has this structure:
Code:
rsync -av --compare-dest=full_back_up original_source/ new_differential_backup/
rsync will follow this logic: (1) go to original_source and take the first file; (2) check if the file exist in the full_backup; (3) if exist and haven't change, stop and fetch the next file from original_source; (4) if it does not exist or has changed, then copy it into new_differential_backup.
Does that clarify things a little bit?
Regards.
I think I understand now.
That should actually do what I'm wanting to do then.
I want to do incremental backups to a new directory each time so after one full backup I could use that backup directory for the "--compare-dest=" directory to find what has changed & the copy only the changed files to a new directory.
Gary
I wish I knew what I used to know before I knew what I didn't know.
Bookmarks