0

I very often use

rsync -a  source/ destination/ 

or even

rsync -a --delete source/ destination/ 

to make destination directory exactly match source.

However, if destination contains files never than source, just the timestamp in my case, rsync leaves them as they are. How can I make rsync to completely sync destianation to source in any case?

1 Answer 1

0

man rsync says:

-c, --checksum      skip based on checksum, not mod-time & size

However, this can have a performance impact.

As far as I can tell, if you also use:

-t, --times         preserve modification times

the modification timestamps on the destination are updated even if the file isn't copied due to identical checksum.

2
  • Won't adapt timestamp of equal files I guess. It seems rsync just refuses to 'downgrade' files. It is merely an update tool than a sync tool in this way.
    – dronus
    Commented Oct 31, 2017 at 11:36
  • If you also use -t the timestamp is updated as far as I can tell, even if the file isn't copied due to identical checksum.
    – xenoid
    Commented Oct 31, 2017 at 13:06

You must log in to answer this question.

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