How to touch uploaded file to increase retention time AWS s3

I have enabled versioning and 90 days retention on AWS s3. This works fine.
However I want some already uploaded files to be retained for another 90 days.

What is the best way to effectively touch the uploaded file to get another 90 days of retentation. Server side copy comes to mind, but is there a better way?

Many thanks!

Have you tried rclone touch ?

Excellent suggestion. Rclone touch works by doing a server side copy to update the metadata.

Note that server side copies are one of the more expensive API calls (but still cheap unless you are doing a very large number).

Thank you @kapitainsky and @ncw !

The touch command does indeed update the modified timestamp that seems to be the basis for blocking deletion on s3 with retentiontime enabled.

1 Like