Cloudflare R2 modified date

I used rclone to successfully clone a bucket from Amazon S3 to Cloudflare R2. However, the modified dates of the files were not preserved. Is that a limitation of Cloudflare R2? Or is there a config setting I can make to keep modified dates? :pray:t3:

The modified date is stored as metadata on the object, and I think this should copy across just fine.

Did you do the copy with rclone? If so which flags did you use?

Alternatively if you are using

  --use-server-modtime   Use server modified time instead of object metadata

That is a property of the object which can't be modified.

1 Like

Thanks, you're right there is an mtime custom metadata attribute written out. I was just surprised it was in custom metadata, but I guess r2 has no standard attribute for modified date

mtime is the nearest we've got to a standard. It's a shame aws didn't define it in the protocol.

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