I have 2 external drives and I want to use rsync
to copy the files that have been updated (modified timestamp) in the source directory to a target directory.
The files have the same filename but the timestamp is different i.e. some files have been recently updated but the filename has remained the same.
However,
rsync -rv --ignore-existing --progress /Volumes/vol1/Data/ /Volumes/vol2/Data/
does not do anything. The result is null nothing is transferred.
sending incremental file list
sent 68 bytes received 12 bytes 160.00 bytes/sec total size is 20,634 speedup is 257.93
How can I solve this?
--ignore-existing
does? Also, if you rely on the timestamps, you may want to actually update the timestamps too. This is done by changing-r
to-a
(which includes-r
).--ignore-existing
to ignore same filenames with same timestamps. If the timestamp has changed then it should copy (update) the file.