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.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.