OSS provides storage classes: Standard, Infrequent Access (IA), Archive, and Cold Archive. You can convert the storage class of an object.

Note The Cold Archive storage class is in public preview in the Australia (Sydney), US (Silicon Valley), Germany (Frankfurt), Indonesia (Jakarta), India (Mumbai), China (Hong Kong), and Singapore region. You can contact technical support to apply for a trial.
You can use one of the following methods to convert the storage class of an OSS object:
  • Method 1: Configure lifecycle rules for automatic conversion
  • Method 2: Use the console, OSS tools, or SDKs to manually convert the storage class for an object

Automatic conversion

OSS lifecycle management provides the object transition mechanism to support the conversion between the following storage classes:
  • Conversion from Standard locally redundant storage (LRS) to IA LRS, Archive, or Cold Archive
  • Conversion from IA LRS to Archive or Cold Archive
  • Conversion from Standard zone-redundant storage (ZRS) to IA ZRS
  • Conversion from Archive to Cold Archive
For example, you can configure a lifecycle policy for objects whose redundancy type is LRS and names contain a specific prefix in a bucket:Lifecycle
  • Objects are converted to IA objects after they are stored for 30 days.
  • Objects are converted to Archive objects after they are stored for 180 days.
  • Objects are converted to Cold Archive objects after they are stored for 360 days.
  • Objects are deleted after they are stored for more than 720 days.
The following table describes the methods to configure lifecycle rules.
Implementation mode Description
Console A user-friendly and intuitive web application
ossutil A high-performance command-line tool
OSS SDK for Java SDK demos for various programming languages
OSS SDK for Python
OSS SDK for PHP
OSS SDK for Go
OSS SDK for C
OSS SDK for .NET
OSS SDK for Node.js
OSS SDK for Ruby
Note If a bucket has Transit to IA Storage Class, Transit to Archive Storage Class, Transit to Cold Archive Storage Class, and Delete configured at the same time, the retention periods in days must comply with the following rule:

Days for Transit to IA Storage Class < Days for Transit to Archive Storage Class < Days for Transit to Cold Archive Storage Class < Days for Delete

Manual conversion

To manually convert the storage class of an object, you can perform an overwrite operation. If an object of the IA, Archive, or Cold Archive storage class is stored for less than a specified number of days, you are charged for objects for the minimum storage duration, including the remaining duration. For more information, see Storage fees.

The following table describes the methods to convert the storage class of an object manually.

Implementation mode Description
Console A user-friendly and intuitive web application
ossutil A high-performance command-line tool
OSS SDK for Java SDK demos for various programming languages
OSS SDK for Python
OSS SDK for Go
OSS SDK for C++
Note Before you modify the storage class of an Archive or Cold Archive object, restore the object, and wait until the object is readable.

Usage notes

After the storage class of an object is converted, the storage fees are calculated based on the unit price of the updated storage class. Before you convert IA, Archive, and Cold Archive objects, take note of the following items:
  • Minimum billable size

    Objects smaller than 64 KB are charged as 64 KB.

  • Minimum storage period
    The minimum storage period that you can set for an IA Object is 30 days. The minimum storage period that you can set for an Archive object is 60 days.The minimum storage period that you can set for a Cold Archive object is 180 days. If these objects are stored for less than the specified number of days, you are charged for objects for the minimum storage duration, including the remaining duration.
    • Automatic conversion

      If the storage class of an object is converted to IA or Archive or Cold Archive based on lifecycle rules, the original retention period of the object carries over to the new object. Example: An object named a.txt is a Standard object. After the object is stored in OSS for 10 days, its storage class is converted to IA based on lifecycle rules. The new object must be stored for a minimum of 20 days. For more information, see FAQ.

    • Manual conversion

      If you manually convert the storage class of an object, the retention period is reset to 0. Example: an object named a.txt is a Standard object. After the object is stored in OSS for 10 days, the storage class is manually converted to IA. The retention period of the new object is reset to 0 and the object must be stored for a minimum of 30 days.

  • Restoration time of Archive and Cold Archive objects

    It takes a period of time to restore objects of Archive and Cold Archive from the frozen status to the readable status. To read data in real time, we recommend that you convert the storage class only to IA, and do not use the Archive or Cold Archive storage class.

  • Data retrieval fees

    Data retrieval fees are incurred when you access IA objects. You are charged for data restoration when you restore Archive or Cold Archive objects. These fees are calculated independently of their generated outbound traffic. If objects need to be accessed more frequently than once a month, we recommend that you do not set the storage class to IA, Archive or Cold Archive.

  • Temporary storage fees (not charged in public preview)

    When you restore a Cold Archive object, a Standard replica is generated for temporary access. OSS charges the temporary storage fees of the replica for the duration during which the replica is available based on Standard storage.