All Products
Search
Document Center

Object Storage Service:Lifecycle

Last Updated:Dec 05, 2024

You can configure lifecycle rules for a bucket based on the last modified time and last access time of objects in the bucket. This way, Object Storage Service (OSS) can regularly convert the storage class of the objects or delete expired objects and parts to reduce your storage costs.

The following table describes the differences between lifecycle rules configured based on the last modified time and last access time of objects.

Policy

Based on last modified time

Based on last access time

Scenarios

Objects are accessed in specific or predictable patterns.

Objects are accessed in random or unpredictable patterns.

Object deletion

Supported

Not supported

Recovery of deleted objects

Deleted objects in unversioned buckets cannot be recovered.

If you configure a lifecycle rule for an unversioned bucket based on the last modified time of objects in the bucket, objects that are deleted based on the lifecycle rule cannot be recovered.

To recover deleted objects, enable versioning for the bucket in which the objects are stored. For more information about how to enable versioning for a bucket, see Versioning. If you configure a lifecycle rule for a versioning-enabled bucket based on the last modified time of objects in the bucket, the current version and previous versions of the objects are deleted based on the lifecycle rule.

  • If the current version of an object is deleted based on the lifecycle rule, OSS does not delete the current version but converts the current version to a previous version and adds a delete marker to the object. The delete marker becomes the new current version.

  • If a previous version of an object is deleted based on the lifecycle rule, OSS deletes the previous version. In addition, if you configure a lifecycle rule to delete previous versions, delete markers that are stored as previous versions are also deleted.

N/A

Reversion of storage class conversion

The object storage class cannot be reverted after it is converted. For example, if the storage class of an object is automatically converted from Standard to Infrequent Access (IA) based on a lifecycle rule, the storage class of the object cannot be reverted to Standard. For more information about the storage class conversion rules supported by lifecycle rules, see Convert storage classes.

Objects whose storage class is converted to IA, Archive, Cold Archive, and Deep Cold Archive have minimum storage periods and minimum billable sizes. You are charged data retrieval fees when you access these objects. For more information, see Convert storage classes.

The object storage class can be reverted after it is converted. If the storage class of an object is automatically converted from Standard to IA based on a lifecycle rule, you can revert the storage class of the object to Standard only when you access the object.

Important

You can revert the storage class of the object to Standard only when you access the object by calling the GetObject operation.

Objects whose storage class is converted from Standard to IA have a minimum storage period and a minimum billable size. You are charged data retrieval fees when you access these objects. For more information, see Lifecycle rules based on the last access time.

For more information about lifecycle rules based on the last modification time, see Lifecycle rules based on the last modified time.

For more information about lifecycle rules based on the last access time, see Lifecycle rules based on the last access time.