With versioning on, overwriting or deleting a file keeps the previous version, so a mistake or a bad sync can be undone.
Turn it on
On the bucket's Settings tab, under Versioning, click Turn versioning on.
Get an old version back
Use a tool that shows versions, such as Cyberduck (View → Show hidden files, then the file's versions) or aws s3api list-object-versions and aws s3api get-object --version-id ….
Good to know
- Old versions count toward your bucket's storage.
- Pause versioning stops keeping new versions; the old ones stay until you delete them.
Was this article helpful? Thanks for your feedback!
