# Versioning: keep old versions of files

> Turn on versioning to keep earlier versions of overwritten or deleted files in your bucket.

Source: https://docs.phluit.com/products/object-storage/s3-versioning/

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.
