, 1 min read

Force rsync Not To Use Timestamps

Original post is here eklausmeier.goip.de/blog/2013/10-02-force-rsync-not-to-use-timestamps.

Most common usage of rsync is

rsync -anv ./ user@remote:/dir/

But when the timestamps of the files on source and target vary wildly it is better to use:

rsync -crntlv ./ user@remote:/dir/

The option -c stands for checksum. The option -n is used to not overwrite anything (dry run). Drop -n to actually run the command.

Option -t to preserve modification times, -r to recursively scan subdirectories, -l for symbolic links, -v for verbose output.

I don't use -p to preserve permissions, but rather let the target system decide how to create files, and leave previous permissions intact.