Lyve Cloud Documentation

Using object immutability

Object immutability prevents objects from being deleted or overwritten by any user or application for a specified retention duration. This is especially useful when you want to meet regulatory data requirements or other scenarios where it is imperative that data cannot be changed or deleted.  Object immutability must be used when you are certain that you do not want anyone, including the Administrator, to delete the objects during their retention duration. When you switch on object immutability, you must also Set Duration and specify the retention period.

Video: How to prevent objects from being deleted

How does versioning work in object immutability?

Versioning allows saving multiple variants of an object in the same bucket. It allows you to preserve, retrieve, and restore every version of an object stored in the bucket. Versioning enables the recovery of objects from any unintended or accidental user actions and application failures.

After switching on object immutability for a bucket, versioning is automatically enabled, Lyve Cloud automatically creates and stores an object version each time when:

  • A new object is uploaded

  • An existing object is overwritten

  • An object is deleted

Note

Versioning may increase your storage capacity utilization.

For example, if you accidentally delete an object, instead of removing it permanently from Lyve Cloud, this deleted object becomes the current object version. You can then restore the previously available version.

When you create a bucket and switch on object immutability, you can switch off object immutability afterwards. However, versioning cannot be suspended for that bucket.

Note

Switching on object immutability, the bucket is labelled as Immutable and Versioned. Switching off object immutability only removes the Immutable label.

Setting duration

The duration for immutability can be specified in days or years at the object level. When you set the duration, objects remain locked and cannot be overwritten or deleted. By default, the duration is set to 30 days.  Setting the duration applies to individual object versions, and different versions of a single object can have different durations set.

For example, if you Set Duration to 10 days and then create an object A, object A will have its retention duration set to 10 days. If you later change the duration to 20 days and upload an object A again, in that case:

  • The retention duration for the first version of object A remains to 10 days.

  • The later version of the same object is set to 20 days.

When you place an object in the bucket, Lyve Cloud calculates the retention duration for an object version by adding the specified duration to the object version's creation timestamp. The calculated date is stored in an object's metadata and protects the object version until the retention duration ends. When retention duration ends for an object, you can retain or manually delete an object.

By default, object immutability is switched off, and you can switch it on only while creating a bucket. Once object immutability is switched on, Lyve Cloud automatically enables versioning for the bucket.  For step-by-step instructions see below.

. To set object immutability:

or

  • When editing a bucket:

    Set_Duration.png
    1. Edit a bucket.

      1. On the left-hand menu, select Buckets.

      2. On the Buckets page, select the bucket Name to edit.

    2. To set object immutability, turn on the On/Off toggle.

    3. Optionally, edit the default value of Set Duration,.

    4. Select the number of Day(s) or Year(s) from the list to set the retention duration.

      Note

      The number of days or years must be a positive integer and less than or equal to 100 years or 36500 days.

      Optionally, check the Delete objects after the retention duration ends check box.