Refresh timestamp


Is there any way to refresh destination time-stamps if size or checksum is the same?

There seems to be a feature request for this, but I believe it wasn't implemented ( Has any alternative way of doing this surfaced in the meanwhile?



rclone copy will update the timestamp for you if it is copying a file and it realises the destination is already present with the correct checksum.

So I guess you are using this on a remote which doesn't support checksums?

@calisro made a patch for this - what do you think about revitalising it, gating it with a flag and submitting a PR @calisro

Hello Nick,

In my case 'rclone copy' just re-transfers everything...

Unfortunately I'm not a programmer, so I can't help there.

I'll ask calisro@ for his binary, even if its an old version all I need is to force the original timestamps.


In that case calisros binary won't help...

Why would the files be transferred? What does the log with -vv say?

Apologies, its not copying everything, my mistake, but since it doesn't support checksum it doesn't update timestamp.

I'll use sync with size-only as a workaround until I can correct the timestamps

I've had a go at implementing the --refresh-times flag here (uploaded in 15-30 mins)

Feedback appreciated!


The --refresh-times flag can be used to update modification times of
existing files when they are out of sync on backends which don't
support hashes.

This is useful if you uploaded files with the incorrect timestamps and
you now wish to correct them.

This flag is only useful for destinations which don't support
hashes (eg crypt).

This can be used any of the sync commands sync, copy or move.

To use this flag you will need to be doing a modification time sync
(so not using --size-only or --checksum). The flag will have no
effect when using --size-only or --checksum.

If this flag is used when rclone comes to upload a file it will check
to see if there is an existing file on the destination. If this file
matches the source with size (and checksum if available) but has a
differing timestamp then instead of re-uploading it, rclone will
update the timestamp on the destination file. If the checksum does not
match rclone will upload the new file. If the checksum is absent (eg
on a crypt backend) then rclone will update the timestamp.

Note that some remotes can't set the modification time without
re-uploading the file so this flag is less useful on them.

Normally if you are doing a modification time sync rclone will update
modification times without --refresh-times provided that the remote
supports checksums and the checksums match on the file. However if the
checksums are absent then rclone will upload the file rather than
setting the timestamp as this is the safe behaviour.


Thanks a million!

I'll test it right away

Just tested it and it works great, zero transfers and updated timestamps.

It finished with:

2020/06/16 23:09:59 DEBUG : 4 go routines active


As I'm not able to install the recent beta to my Unraid server I will use this (hopefully working) compromise:

1.) Mount the webdav server through rclone mount
2.) Use rsync with -t and --size-only

Maybe this helps others, too.

I've merged this to master now which means it is in the latest beta now and released in v1.53

Thanks for testing :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.