3

How would I go about rsyncing the difference between two directories to a 3rd directory. For example, if I have the command

rsync -av --progress --stats /hdd1/ /hdd2/

I would like to copy the difference between hdd1 and hdd2 to a 3rd directory, without copying any data to hdd2 (as it is a full hard drive). What's the best way to go about this?

1 Answer 1

3

Maybe the --compare-dest option of rsync could be helpful. I think

rsync -av --progress --stats --compare-dest=/hdd2 /hdd1/ /3rd_dir/

might work.

1
  • I just noticed the compare-dest argument is relative to the '3rd_dir'. In this case you are using absolute path, but if hdd2 where a dir relative to 3rd_dir, you would need to use the relative path from 3rd_dir.
    – code-gijoe
    Aug 13, 2012 at 14:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .