Updated on 2022-10-08 GMT+08:00

Overview

Lifecycle management for OBS includes periodically deleting objects from buckets and transitioning between object storage classes based on pre-defined rules.

You may configure lifecycle management rules to:
  • Periodically delete files that are only meant to be retained for specified periods of time.
  • Transition documents that are seldom accessed to the Infrequent Access or Archive storage class or delete them.

You can define lifecycle rules to identify objects in the scenarios above and further manage their lifecycles.

Using lifecycle rules to transition objects that are no longer frequently accessed to the Archive or Infrequent Access storage class can save costs. Transition basically means that the object storage class is altered without copying the object. You can also manually change the storage class of an object on the Objects page. For details, see Uploading a File or Folder.

Lifecycle management rules have two key elements:

  • Policy: You can configure a lifecycle rule for it to apply to a set of objects with the specified prefix, or to apply to the entire bucket (that is, apply to all the objects in the bucket).
  • Time: You can use a lifecycle rule to specify the number of days after which objects that have been last updated and meet specified conditions are automatically transitioned to the Infrequent Access or Archive storage class, or are automatically deleted upon expiration.
    • Transition to Infrequent Access: This defines the number of days since the last object update after which objects meeting specified conditions are automatically transitioned to the Infrequent Access storage class.
    • Transition to Archive: This defines the number of days since the last object update after which objects meeting specified conditions are automatically transitioned to the Archive storage class.
    • Delete Objects: This defines the number of days since the last object update after which objects meeting specified conditions are automatically expired and then deleted.

Objects can be transitioned to Infrequent Access at least 30 days after their last update. If you configure to transition objects first to Infrequent Access and then Archive, the objects must stay Infrequent Access at least 30 days before they can be transitioned to Archive. For example, if you configure to transition objects to Infrequent Access 33 days after their last update, the objects can be transitioned to Archive at least 63 days after their last update. If only transition to Archive is used, but transition to Infrequent Access is not, there is no limit on the number of days for transition. The number of days for objects to expire must be greater than the two transition times.