Skip to main content

Versioning

Arvancloud's Object Storage Versioning feature allows you to save and restore multiple copies of a file in a bucket. By activating this feature, if several Write requests are sent to an object, Arvancloud's Object Storage will keep all versions of this file in the bucket. From then on, all files have a current version and may have several non-current versions (with Version ID). For example, if you delete an object from a bucket for which versioning is enabled, a delete marker will be added to it, making it an out-of-date version; Or if you overwrite a file, a new version of that file will be created in the bucket.

Versioning is disabled by default and you can enable it for free for any bucket you need.

Enable Versioning

From the "Buckets" menu, select the bucket you want to enable versioning on, and then enter the "Operations" section. You can also enable versioning for a new bucket when you create it.

You can change the status of this feature to active by clicking the "Customize" button in front of Versioning.

From now on, you can store different versions of the same object in the bucket. This feature is applied to all objects in a bucket, and each new object you upload to it is versioned and receives a unique identifier called a version number. Also, files that already exist in the bucket will be versioned from now on.

Note that objects that were in the bucket before versioning was enabled will receive a null version ID. These objects do not change with versioning enabled, and their new versions are stored in the bucket with a unique version ID.

By enabling versioning, each object has a current version and can have several non-current versions. Now:

  • If you delete an object, the current version is deleted instead of permanently deleted. You can then restore previous versions of it using the API.
  • If you overwrite an object, a new version of that object is added to the bucket, and the previous version becomes a non-current version that you can restore at any time.

The current version is the latest version of an object.

Retrieve Versions

When versioning is active on the bucket, you can see the available versions of a file and its details in the panel from the Actions menu in front of each object and selecting the "Versions" option.

From this section, you can download or delete the desired version and change its permission.

If you delete an object or a file from the bucket via API, a delete marker will be added to its current version. After that, you cannot get this file by sending a normal GET request and you will get a 404 error. This object is also not displayed in the panel, but you can still get its previous versions with the API.

Note that if there is no other version than the current version in the bucket, the object is completely and permanently deleted and it is not possible to restore it. Moreover, by deleting a file from the user panel, all its versions will be deleted and won't be recovered.

Disable Versioning

To disable the versioning of a bucket, enter the "Operations" section and change its status to disabled by clicking on the "Customize" option.

By disabling versioning, previous versions of objects will still be accessible and:

  • Lifecycle rules set for previous versions will be applied;
  • The current version of the objects in the bucket is not changed;
  • Uploading a new object with a duplicate name replaces the current version of the object.