# File Versioning on Overwrite: Which Cloud Storage Keeps the Old Copy

> When you upload a file with the same name, does your cloud keep the old copy? Defaults, retention, costs and off switches for Dropbox, Google Drive, OneDrive, Box, Backblaze B2, Amazon S3, Wasabi, R2 and more.

![Overwrite a file. Is the old copy still there? Which clouds keep the old version, and for how long: Amazon S3, Azure Blob, Backblaze B2, Wasabi, Google Drive, Dropbox, OneDrive and Google Cloud](https://blober.io/kb/articles/cloud-storage-file-versioning-on-overwrite/cover.f4dedfb19c.webp)

Upload a file with the same name as one that is already there, and some clouds keep the old copy as a version while others replace it. Dropbox, Google Drive, OneDrive, pCloud and Proton Drive keep older versions for a limited time or number of versions, and so does Box on its paid plans. Backblaze B2 and STRG keep every version until you delete it or a lifecycle rule removes it. Amazon S3, Wasabi, DigitalOcean Spaces, Oracle, IBM and OVHcloud keep versions only after you turn versioning on. Cloudflare R2 does not implement S3 versioning.

## What versioning on overwrite means

An overwrite is an upload to a name that already exists. With versioning, the file that was there becomes an older version, and you can open or restore it later. Without versioning, the old bytes are gone as soon as the upload finishes.

A trash or recycle bin is a different thing: it keeps files that you deleted, while version history keeps files that you replaced. In a versioned bucket on object storage, a delete adds a delete marker instead of removing the object, and you can still restore the previous version[[1]](https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html). Backblaze calls its version of this a hide marker[[2]](https://www.backblaze.com/docs/cloud-storage-file-versions).

## Why it matters

A common way to lose data in the cloud is a good file replaced by a bad one:

- You save over the wrong document, or an export tool writes an empty file over a full one.
- A sync client on a broken laptop uploads damaged or old copies over the good ones.
- Ransomware encrypts the files on a computer, and the sync client uploads the encrypted copies.

A trash does not help here, because nothing was deleted. Only an older version brings the file back. Amazon lists versioning and Object Lock among the defences for S3 data in its ransomware guidance[[3]](https://aws.amazon.com/blogs/security/anatomy-of-a-ransomware-event-targeting-data-in-amazon-s3/), and Microsoft recommends blob versioning to recover from overwrites in Azure[[4]](https://learn.microsoft.com/en-us/azure/storage/blobs/data-protection-overview).

Versioning also makes a transfer safer. If you copy files into a destination that already has files with the same names, an overwrite on a versioned destination can be undone.

## What it costs

- On Amazon S3, each version is a full object, so three versions of a file cost the same as three files[[5]](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html). IBM[[6]](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-versioning) and OVHcloud[[7]](https://docs.ovhcloud.com/en/guides/storage-and-backup/object-storage/s3-versioning) also bill each version as a full object.
- On Backblaze B2, old and hidden versions count toward your stored data[[8]](https://www.backblaze.com/docs/cloud-storage-lifecycle-rules).
- Azure bills the unique blocks of a blob and its versions, so a version that shares most of its blocks with the current blob costs less[[9]](https://learn.microsoft.com/en-us/azure/storage/blobs/versioning-overview).
- Dropbox version history uses none of your storage space[[10]](https://help.dropbox.com/delete-restore/version-history-overview).
- Box counts versions in your storage use[[11]](https://support.box.com/hc/en-us/articles/32864566898195-User-level-storage-calculation-update). On SharePoint and OneDrive for work or school, a high version limit can use a lot of your quota[[12]](https://learn.microsoft.com/en-us/sharepoint/plan-version-storage).
- Wasabi has a minimum storage duration of 90 days on Pay as You Go. When you overwrite a file in a bucket without versioning, you still pay for the old copy until those days are up, on top of the new copy[[13]](https://wasabi.com/pricing/faq).

## When to leave it on

Leave versioning on for data that you cannot make again: documents, photos, finished video, accounting files and the only copy of a backup. Leave it on in a bucket that a sync or backup tool writes to, because the tool can overwrite good files with bad ones faster than you notice. Leave it on in a destination that you migrate into, at least until you have checked the result.

If you can choose how long versions stay, pick a period longer than the time you would need to notice a problem. A version that expires after 7 days does not help with a damaged file that you find a month later.

## When to turn it off or limit it

Old versions have no value for some data and only add cost:

- Cache, temporary and build files, and logs that a tool rewrites all the time.
- Data that a backup tool already versions inside its own archive.
- Large media files that you replace with a new edit and never need in the old state.

For Azure, Microsoft suggests keeping data that is overwritten often in a separate storage account with versioning off[[14]](https://learn.microsoft.com/en-us/azure/storage/blobs/versioning-overview). On object storage that sets versioning per bucket, a separate bucket does the same job.

Some object stores do not let you switch versioning fully off. Once it is on, Amazon S3[[15]](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html), IBM[[16]](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-versioning) and OVHcloud[[17]](https://docs.ovhcloud.com/en/guides/storage-and-backup/object-storage/s3-versioning) let you only suspend it, and STRG keeps it on at all times[[18]](https://docs.strg.com/s3-api/overview). Backblaze B2 buckets are always versioned by default[[19]](https://www.backblaze.com/docs/cloud-storage-s3-compatible-api-bucket-versions). There, a lifecycle rule can keep only the last version of each file, or keep older versions for a set number of days[[20]](https://www.backblaze.com/docs/cloud-storage-lifecycle-rules).

## Cloud drives: versioning defaults

| Provider | Keeps the old copy on overwrite | How long, or how many | Counts toward storage | Can you change it |
|---|---|---|---|---|
| Dropbox | Yes | 30 days (Basic, Plus, Family), 180 days (Professional, Essentials, Business, Standard), 365 days (Business Plus, Advanced, Enterprise)[[21]](https://help.dropbox.com/delete-restore/version-history-overview) | No | Longer with a paid add-on[[22]](https://help.dropbox.com/delete-restore/extended-version-history) |
| Google Drive | Yes, for an upload with the same name[[23]](https://support.google.com/drive/answer/2424368) | May be deleted after 30 days or once there are 100 newer versions[[24]](https://support.google.com/drive/answer/2409045), unless marked Keep Forever[[25]](https://developers.google.com/workspace/drive/api/guides/manage-revisions) | Only versions marked Keep Forever[[26]](https://developers.google.com/workspace/drive/api/guides/manage-revisions) | Mark up to 200 versions Keep Forever |
| OneDrive (personal) | Yes | 25 versions on one Microsoft page[[27]](https://support.microsoft.com/en-us/office/collab-files/view-previous-versions-of-office-files), 30 days on another[[28]](https://support.microsoft.com/office/159cad6d-d76e-4981-88ef-de6e96c93893) | Not stated | Not stated |
| OneDrive for work or school, SharePoint | Yes | 500 major versions with no expiry, the default for new libraries and OneDrive accounts[[29]](https://learn.microsoft.com/en-us/sharepoint/set-default-org-version-limits) | Yes[[30]](https://learn.microsoft.com/en-us/sharepoint/plan-version-storage) | An admin sets count and time limits, or the automatic mode |
| Box | Yes, except on Personal Free | Personal Pro 10 versions, Starter 25, Business and Business Plus 50, Enterprise 100[[31]](https://support.box.com/hc/en-us/articles/360043693454-Adjusting-the-Number-of-File-Versions-to-Preserve) | Yes[[32]](https://support.box.com/hc/en-us/articles/32864566898195-User-level-storage-calculation-update) | Admins can raise or lower the number |
| pCloud | Yes | 30 days (free), 60 days (paid), 365 days with the Extended File History add-on[[33]](https://help.pcloud.com/article/file-recovery-and-history) | Not stated | Add-on only |
| Proton Drive | Yes, with "Replace existing file"[[34]](https://proton.me/support/version-history) | Free: up to 10 versions for 7 days. Paid: up to 200 versions, kept from 7 days up to 10 years | Not stated | Paid plans choose the period |
| Koofr | Yes | 120 days (free), up to two years (paid). Files larger than 5 GB have no versions[[35]](https://koofr.eu/help/create-upload-and-rename-files/how-long-are-the-previous-versions-of-my-files-stored-on-koofr/) | Not stated | Not stated |
| Nextcloud | Yes, with the Versions app | Fewer over time, then one a week after 30 days. Versions never use more than half of the user's free space[[36]](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/file_versioning.html) | Not stated | Yes, in config.php |
| Seafile | Depends on the library | The library owner sets the period for each library[[37]](https://help.seafile.com/file_folder_managing/setting_library_history) | Not stated | Yes, per library |

## Object storage: versioning defaults

| Provider | Default for a new bucket | How long versions stay | Billed | Can you turn it off |
|---|---|---|---|---|
| Backblaze B2 | On[[38]](https://www.backblaze.com/docs/cloud-storage-s3-compatible-api-bucket-versions) | Forever by default, unless you delete them[[39]](https://www.backblaze.com/docs/cloud-storage-lifecycle-rules) | Yes | Not stated. A lifecycle rule can keep only the last version |
| STRG | On, always[[40]](https://docs.strg.com/s3-api/overview) | Until you delete them or a lifecycle policy removes them[[41]](https://docs.strg.com/billing) | Yes[[42]](https://docs.strg.com/billing) | No |
| Amazon S3 | Off[[43]](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html) | Until you delete them or a lifecycle rule removes them[[44]](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) | Yes, each version as a full object | Suspend only, once it is on |
| Wasabi | Off[[45]](https://docs.wasabi.com/docs/versioning) | Not stated | Yes | Suspend. Existing versions stay[[46]](https://docs.wasabi.com/docs/bucket-versioning-enabledisable) |
| Cloudflare R2 | Not implemented[[47]](https://developers.cloudflare.com/r2/api/s3/api/) | | | |
| DigitalOcean Spaces | Off. You turn it on with the Spaces API only[[48]](https://docs.digitalocean.com/products/spaces/how-to/enable-versioning/) | Not stated | Not stated | Yes, with the API |
| Azure Blob Storage | You turn it on for the storage account[[49]](https://learn.microsoft.com/en-us/azure/storage/blobs/versioning-overview) | Until you delete them or a lifecycle policy deletes them | Yes | Yes. Existing versions stay |
| Google Cloud Storage | You turn it on per bucket[[50]](https://docs.cloud.google.com/storage/docs/object-versioning) | Until you delete them or a lifecycle rule removes them | Yes | Yes. Existing versions stay |
| Oracle Cloud | Off[[51]](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/usingversioning.htm) | Until you delete them | Yes | Suspend only |
| IBM Cloud Object Storage | Off[[52]](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-versioning) | Not stated | Yes, each version as a full object | Suspend only |
| OVHcloud | Off[[53]](https://docs.ovhcloud.com/en/guides/storage-and-backup/object-storage/s3-versioning) | Not stated | Yes, each version as a full object | Suspend only |
| Storj | Off[[54]](https://storj.dev/dcs/api/s3/object-versioning) | Not stated | Yes | Suspend. Older buckets cannot turn it on |
| Hetzner | You turn it on per bucket[[55]](https://docs.hetzner.com/storage/object-storage/howto-protect-objects/protect-versioning) | Not stated | Not stated | Suspend |
| Akamai (Linode) | You turn it on per bucket, with third-party tools[[56]](https://techdocs.akamai.com/cloud-computing/docs/versioning-retain-object-version-history) | Not stated | Not stated | Yes, with third-party tools |

## Notes by provider

### Dropbox

A file that you delete permanently cannot be recovered, even by Dropbox Support[[57]](https://help.dropbox.com/delete-restore/recover-deleted-files-folders).

### Google Drive

The 30-day and 100-version limits apply to uploaded files such as PDFs and images. Google Docs, Sheets and Slides have their own version history[[58]](https://support.google.com/drive/answer/2409045).

### OneDrive and SharePoint

Microsoft recommends the automatic setting. It keeps every version for the first 30 days, up to 500, and then keeps hourly, daily and weekly versions as they get older[[59]](https://learn.microsoft.com/en-us/sharepoint/plan-version-storage). An admin can instead set 100 to 50,000 major versions, or an expiry of more than 30 days[[60]](https://learn.microsoft.com/en-us/sharepoint/set-default-org-version-limits). A retention policy overrides all of these limits[[61]](https://learn.microsoft.com/en-us/sharepoint/faqs-for-versions).

### Box

Box keeps the most versions that your plan allows. A very low limit can remove versions that Box Sign still needs[[62]](https://support.box.com/hc/en-us/articles/360043693454-Adjusting-the-Number-of-File-Versions-to-Preserve).

### Proton Drive

When you upload a file whose name already exists, Proton Drive asks what to do. "Replace existing file" keeps the current file as a previous version, and "Keep both files" adds a number to the new name. Free plans cannot change the version settings[[63]](https://proton.me/support/version-history).

### Backblaze B2

B2 has no minimum storage duration fees[[64]](https://www.backblaze.com/cloud-storage/pricing).

### Amazon S3

A lifecycle rule can expire old versions and keep a set number of the newest ones[[65]](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html). Object Lock works only in a versioned bucket[[66]](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html).

### Wasabi

With versioning on, every version adds to your storage cost[[67]](https://docs.wasabi.com/docs/versioning).

### Cloudflare R2

R2 does not implement the S3 versioning or Object Lock calls[[68]](https://developers.cloudflare.com/r2/api/s3/api/), and a plain write replaces any object with the same key[[69]](https://developers.cloudflare.com/r2/api/s3/conditional-operations/). Keep another copy of data that you cannot lose.

### Azure Blob Storage

With versioning on, deleting a blob does not free space: the current version becomes a previous version and is still billed. Keep fewer than 1,000 versions per blob, because more slow down listing[[70]](https://learn.microsoft.com/en-us/azure/storage/blobs/versioning-overview).

### Google Cloud Storage

Soft delete is on by default for 7 days in every bucket that supports it. It keeps deleted and overwritten objects, and you pay for them until the period ends[[71]](https://docs.cloud.google.com/storage/docs/soft-delete).

## How versioning works with Blober

[Blober](https://blober.io) copies files between clouds, so versioning decides what happens when a file with the same name is already at the destination:

- The default, "Skip if a file with the same name exists", leaves the existing file as it is.
- "Overwrite the existing file" replaces it. On Google Drive, OneDrive, Dropbox and a versioned bucket such as Backblaze B2 or [STRG](https://blober.io/kb/docs/providers/strg/), the old copy stays in the version history. On Proton Drive, the old file goes to the trash.
- On Backblaze B2, a Move or Delete workflow hides the file. On STRG, it adds a delete marker. On both, the older versions stay until you delete them or a lifecycle rule removes them.
- Blober copies the current version of each file. Older versions stay with the source, so check what you need before you close an old account.

[How Blober Handles Duplicate Files in Long-Running Backups](https://blober.io/kb/articles/avoid-duplicate-files-long-running-backups/) explains the two options in more detail.

## Frequently asked questions

**Is version history the same as a backup?**
No. Versions live in the same account as the current file, and many providers remove them after a set period. Keep a copy with a second provider as well, as the [3-2-1 backup rule](https://blober.io/kb/articles/3-2-1-backup-rule-for-cloud/) describes.

**Is soft delete the same as versioning?**
No. Soft delete keeps deleted data, and on some providers overwritten data, for a set number of days. [Soft Delete vs Versioning](https://blober.io/kb/articles/soft-delete-vs-versioning/) lists the soft delete and trash periods of the major providers.

**Why did my storage bill go up after a large sync?**
If the destination keeps versions, every overwrite during the sync kept the old copy too. Check the bucket for old versions, and add a lifecycle rule if you do not need them.

## Related guides

- [Soft Delete vs Versioning](https://blober.io/kb/articles/soft-delete-vs-versioning/)
- [The 3-2-1 Backup Rule for Cloud Storage](https://blober.io/kb/articles/3-2-1-backup-rule-for-cloud/)
- [How Blober Handles Duplicate Files in Long-Running Backups](https://blober.io/kb/articles/avoid-duplicate-files-long-running-backups/)
- [Best S3-Compatible Object Storage Specialists](https://blober.io/kb/articles/best-s3-compatible-object-storage-specialists/)
- [The Complete List of S3-Compatible Providers](https://blober.io/kb/articles/s3-compatible-storage-providers-complete-list/)
- [Cloud Storage Ingress vs Egress Fees](https://blober.io/kb/articles/cloud-storage-ingress-egress-fees-explained/)
