Protect data with object lock

Protect data with object lock

With object lock enabled, your data in a bucket can be protected through a write-once-read-many (WORM) mechanism. Object lock prevents deletion of an object version for a specified retention period.1

Notes:

  1. The lock cannot be released, by any means or anybody, until the end of the retention period.

Bucket settings

Enable object lock

The object lock feature must be enabled upon bucket creation. You cannot enable the feature later for a bucket with object lock disabled. Once enabled, the feature cannot be suspended, either.

Set default retention period

  1. On C2 Object Storage web portal > Buckets, hover your mouse pointer over a bucket, click on the floating button, and choose Set data protection.
  2. If you select Set default retention period, any future uploads via the web portal (or via an API call without the retention period parameter) onto this bucket will be locked automatically for the specified number of days. You can choose from the drop-down menu or directly enter your desired number of days.
  3. Click Save.

For more information, refer to Manage buckets > Set data protection.

Check object lock expiration date

You can check the expiration date of an object version's object lock retention period from its metadata.

  1. Hover your mouse pointer over an object (or its specific version), click on the floating button, and choose View metadata.
  2. If object lock is applied to the object version, you can view the Expiration data in its metadata.

Manually lock an object

If the default retention period was not set, you can manually set the retention period's expiration date for an uploaded object to lock it immediately.

  1. Hover your mouse pointer over an object, click on the floating button, and choose Set object lock expiration date.
  2. Click on the field and select your desired expiration date from the pop-up calendar, and then click OK.
  3. The object lock is now applied to the object's current version. If you delete the object outside the "Show versions" view (i.e., not permanent deletion) or upload a new object with the same file name, this locked version will become a noncurrent version, which you can retrieve from the "Show versions" view.

You can also lock a specific noncurrent version of an object.

  1. In the Show versions view, hover your mouse pointer over an object, click on the floating button, and choose View all versions.
  2. Hover your mouse pointer over a specific version, click on the floating button, and choose Set object lock expiration date.
  3. Click on the field and select your desired expiration date from the pop-up calendar, and then click OK. This version is now locked and cannot be deleted until the expiration date.

Extend retention period

You can manually set a new expiration date1 of retention period (following the same steps instructed in Manually lock an object above) for an already locked object version.

Notes:

  • The new expiration date cannot be prior to the current expiration date.
Contents
Bucket settings
Enable object lock
Set default retention period
Check object lock expiration date
Manually lock an object
Extend retention period
Further reading