OSS provides the following 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) 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 (LRS) to IA (LRS) or Archive (LRS) or Cold Archive
  • Conversion from IA (LRS) to Archive (LRS) or Cold Archive
  • Conversion from Standard (ZRS) to IA (ZRS)
  • Conversion from Archive (LRS) to Cold Archive

For example, you can configure a lifecycle policy for objects whose names contain a specific prefix in a bucket as follows:

  • Objects are converted to IA objects after they have been stored for 30 days.
  • Objects are converted to archives after they have been stored for 180 days.
  • Objects are converted to cold archives after they have been stored for 360 days.
  • Objects are deleted after they have been stored for 720 days.

You can configure the preceding lifecycle policies from the OSS console. For more information, see Configure lifecycle rules.

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 or Archive storage class has been stored for less than a specified number of days, modifying the storage class of the object will incur early deletion fees. For more information, see Billing items and methods.

Before you modify the storage class of an archive or a cold archive, restore the object and wait until the object is readable.

The following table describes the different methods that can be used to manually convert the storage class of an object.

Implementation mode Description
Console User-friendly and intuitive web application
ossutil 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++

Instructions

After the storage class of an object has been converted, the storage fees are calculated based on the unit price of the updated storage class. Before you convert the storage class of IA objects and archives and cold archives, note that:
  • Minimum billable size

    Objects less than 64 KB in size 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 is 60 days.The minimum storage period that you can set for a cold archive is 180 days. If an object of these storage classes has been stored for less than the specified number of days, deleting the object will incur early deletion fees.
    • 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 will carry over to the new object. Example: An object named a.txt is a standard object. After it has been stored in OSS for 10 days, its storage class is converted to IA based on its lifecycle rules. The new object will be considered to have been stored for 10 days already and must be stored for a minimum of at least another 20 days. For more information, see FAQ.
    • If you manually convert the storage class of an object, the retention period will be reset to 0. Example: an object named a.txt is a standard object. After it 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.
  • Restore time of archives and cold archives

    It takes some amount of time to restore archives and cold archives from the frozen state to the readable state. To read data in real time, we recommend that you only convert the storage class 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. Data restoration fees are incurred when you restore archives and cold archives. These fees are calculated independently of their generated outbound traffic. For objects that need to be accessed more frequently than once a month, we recommend that you do not set the storage class to IA or Archive or Cold Archive.

  • Temporary storage fees (not charged in public preview)

    When you restore a cold archived object, OSS generates a temporary copy of the object for access. This copy is of the Standard storage class and is charged at the price of the Standard storage before the restored state of the object expires.