You can create 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 save 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
Scenario 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 Objects in unversioned buckets cannot be recovered after the objects are deleted.

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, see Overview. If you configure a lifecycle rule for a versioned bucket based on the last modified time of objects in the bucket, the current version and previous versions of the objects are deleted in different ways 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 object.
  • 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 IA based on a lifecycle rule, the storage class of the object cannot reverted back to Standard. For more information about the storage class conversion rules supported by lifecycle rules, see Automatic conversion.

Objects whose storage class is converted to IA, Archive, and 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 Usage notes.

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 back to Standard when you access the object.

Objects whose storage class is converted 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 Usage notes.

For more information about lifecycle rules based on the last access 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.