Object Storage Service (OSS) provides the following storage classes: Standard, Infrequent Access (IA), Archive, Cold Archive, and Deep Cold Archive. You can convert the storage class of an object automatically by using a preset lifecycle rule or manually by calling the CopyObject operation.
We recommend that you do not change the storage classes of objects in the .dlsdata/
directory of a bucket for which OSS-HDFS is enabled.
If you change the storage class of an object in the .dlsdata/
directory to Infrequent Access (IA), the object remains accessible by using OSS-HDFS. If you change the storage class of an object in the directory to Archive, Cold Archive, or Deep Cold Archive, the object cannot be directly accessed by using OSS-HDFS. You must restore the object before you can access it.
Configure lifecycle rules to automatically convert the storage classes of objects
Storage class conversion based on the last modified time of objects
LRS
The storage classes of locally redundant storage (LRS) objects can be converted based on the following rules:
Conversions from Standard LRS to IA LRS, Archive LRS, Cold Archive LRS, or Cold Archive LRS
Conversions from IA LRS to Archive LRS, Cold Archive LRS, or Deep Cold Archive LRS
Conversions from Archive LRS to Cold Archive LRS or Deep Cold Archive LRS
Conversions from Cold Archive LRS to Deep Cold Archive LRS
If different policies are configured for a bucket at the same time to convert the storage classes of objects to IA, Archive, Cold Archive, and Deep Cold Archive, the periods specified in the policies must meet the following requirements:
Period of time required for conversion to IA < Period of time required for conversion to Archive < Period of time required for conversion to Cold Archive < Period of time required for conversion to Deep Cold Archive
ZRS
The storage class of zone-redundant storage (ZRS) objects can be converted based on the following rules:
Conversions from Standard ZRS to IA ZRS, Archive ZRS, Cold Archive LRS, or Deep Cold Archive LRS
Conversions from IA ZRS to Archive ZRS, Cold Archive LRS, or Deep Cold Archive LRS
Conversions from Archive ZRS to Cold Archive LRS or Deep Cold Archive LRS
Conversions from Cold Archive LRS to Deep Cold Archive LRS
For more information, see Lifecycle rules based on the last modified time.
Storage class conversion based on the last access time of objects
If you want to convert the storage class of objects from Standard or IA to Archive, Cold Archive, or Deep Cold Archive, submit a ticket to apply for the required permissions first. After your application is approved, you must specify the storage class to which you want to convert the storage class of the objects.
After your application is approved, if you use a lifecycle rule based on the last access time to convert the storage class of an object from Standard or IA to Archive, Cold Archive, or Deep Cold Archive, the last access time of the Archive, Cold Archive, or Deep Cold Archive object is the time when access tracking was enabled for the bucket in which the object is stored.
LRS
The storage classes of LRS objects can be converted based on the following rules:
Conversions from Standard LRS to IA LRS, Archive LRS, Cold Archive LRS, or Cold Archive LRS
Conversions from Standard LRS to IA LRS and conversions or no conversions from IA LRS to Standard LRS after the object is accessed
Conversions from IA LRS to Archive LRS, Cold Archive LRS, or Deep Cold Archive LRS
Conversions from Archive LRS to Cold Archive LRS or Deep Cold Archive LRS
Conversions from Cold Archive LRS to Deep Cold Archive LRS
ZRS
The storage class of ZRS objects can be converted based on the following rules:
Conversions from Standard ZRS to IA ZRS, Archive ZRS, Cold Archive LRS, or Deep Cold Archive LRS
Conversions from Standard ZRS to IA ZRS and conversions or no conversions from IA ZRS to Standard ZRS after the object is accessed
Conversions from IA ZRS to Archive ZRS, Cold Archive LRS, or Deep Cold Archive LRS
Conversions from Archive ZRS to Cold Archive LRS or Deep Cold Archive LRS
Conversions from Cold Archive LRS to Deep Cold Archive LRS
For more information, see Lifecycle rules based on the last access time.
Configure lifecycle rules to convert the storage classes of objects
You can use multiple methods to configure lifecycle rules. Based on the lifecycle rules that you configure, OSS converts the storage classes of multiple objects to the specified storage class or deletes objects and parts after the specified period of time elapses. Below are procedures of converting the storage classes of objects to a specific storage class via lifecycle rules:
Call CopyObject to manually convert the storage classes of objects
You can call the CopyObject operation to convert the storage class of an object by overwriting the object.
If you convert the storage class of an object to IA, Archive, Cold Archive, or Deep Cold Archive, you are charged storage fees based on the object size and storage duration of the IA object, or storage fees based on the object size and storage duration and data retrieval fees for the Archive, Cold Archive, or Deep Cold Archive object. For more information, see the Usage notes section.
To convert the storage class of an Archive, Cold Archive, or Deep Cold Archive object, you must first restore the object. For more information about how to restore an object, see Restore objects. If real-time access of Archive objects is enabled for a bucket, you can directly convert the storage class of Archive objects in the bucket without restoring them. You are charged Archive data retrieval fees based on the size of accessed Archive data. For more information, see Real-time access of Archive objects.
If you call the CopyObject operation to convert the storage class of an object in a bucket for which versioning is enabled, OSS automatically generates a unique version ID for the destination object. The version ID is returned in the
x-oss-version-id
response header.If versioning is disabled or suspended for the bucket, OSS generates a version whose ID is null for the destination object and overwrites the existing version whose ID is null. If the storage class of the overwritten version is IA, Archive, Cold Archive, or Deep Cold Archive, you may be charged for the storage usage of the version that is stored for less than the minimum storage duration. For more information, see How am I charged for objects whose storage duration is less than the minimum storage duration?
Rules for storage class conversion by calling CopyObject
LRS
You can convert an LRS object between two of the following storage classes: Standard LRS, IA LRS, Archive LRS, Cold Archive LRS, and Deep Cold Archive LRS.
ZRS
Conversions between storage classes support Standard ZRS, IA ZRS and Archive ZRS.
When converting an Archive LRS object to a Standard ZRS or IA ZRS object, operations are needed based on the Settings of the Bucket where the object resides.
If Real-time access of Archive objects is enabled for a Bucket, storage classes of archive objects can be converted without restoration.
If it is not enabled, Restore objects before converting the storage classes of archive objects.
Methods to manually convert the storage classes of objects
Usage notes
When you convert the storage class of an object to IA, Archive, Cold Archive, or Deep Cold Archive, take note of the following items:
Minimum billable size
The minimum billable size of an object is 64 KB. If an object is less than 64 KB in size, you are charged for the minimum billable size of the object.
Minimum storage duration
The minimum storage duration is 30 days for IA objects, 60 days for Archive objects, and 180 days for Cold Archive and Deep Cold Archive objects. If an object is stored for a period of time less than the minimum storage duration, you are charged for the storage usage of the object that is stored for less than the minimum storage duration. For more information, see Storage fees.
Configure lifecycle rules to automatically convert the storage classes of objects
If you convert the storage class of an object to IA or Archive, OSS does not recalculate the retention period.
For 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. After the storage class conversion, the object must be stored as an IA object for another 20 days to meet the minimum storage duration requirement of the IA storage class.
If you convert the storage class of an object to Cold Archive or Deep Cold Archive, OSS recalculates the retention period.
Example 1: An object named a.txt is a Standard or IA object. After the object is stored in OSS for 10 days, its storage class is converted to Cold Archive or Deep Cold Archive based on lifecycle rules. After the storage class conversion, the object must be stored for 180 days to meet the minimum storage duration requirement of the Cold Archive or Deep Cold Archive storage class.
Example 2: An object named a.txt is a Cold Archive object. After the object is stored in OSS for 30 days, its storage class is converted to Deep Cold Archive based on lifecycle rules. You are charged for the storage usage of the Cold Archive object that is stored for 30 days and the storage usage of the Cold Archive object that is stored for less than the minimum storage duration (180 - 30). After the object is converted to a Deep Cold Archive object, the object must be stored for 180 days to meet the minimum storage duration requirement of the Deep Cold Archive storage class.
Call CopyObject to manually convert the storage classes of objects
If you call the CopyObject operation to manually convert the storage class of an object, OSS recalculates the storage duration of the object.
For 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 by calling the CopyObject operation. After the storage class conversion, the object must be stored as an IA object for 30 days to meet the minimum storage duration requirement for the IA storage class.
If you rename an IA object, an Archive object, a Cold Archive, or a Deep Cold Archive object or overwrite the object by uploading an object that has the same name before the minimum storage duration elapses, you are also charged for the storage usage of the object that is stored for less than the minimum storage duration. For example, if you rename an IA object after it is stored for 29 days, OSS recalculates the last modified time of the object. That is, you need to store the object for another 30 days to meet the minimum storage duration requirement of the IA storage class.
Restoration time
Archive, Cold Archive, and Deep Cold Archive objects must be restored before they can be accessed. It takes a period of time to restore an Archive, Cold Archive, or Deep Cold Archive object. If your business scenario requires real-time access to objects, we recommend that you do not convert the storage class of objects to Archive, Cold Archive, or Deep Cold Archive.
API operation calling fees
Conversion method | Storage class before conversion | API operation calling fee |
Conversion method | Storage class before conversion | API operation calling fee |
Lifecycle rule | Standard, IA, Archive, and Cold Archive | You are charged for PUT requests based on the storage class before the conversion. The API operation calling fee is included in the bill for the current bucket. |
CopyObject | Archive |
|
Standard, IA, Cold Archive, and Deep Cold Archive | You are charged for PUT requests based on the storage class of the source object. The API operation calling fee is included in the bill for the destination bucket. |
① If you call the CopyObject operation to convert an Archive object in a bucket for which real-time access of Archive objects is enabled, you do not need to restore the object in advance, and you are not charged for the restoration. You are charged Archive data retrieval fees based on the size of the accessed Archive data.
② If you call the CopyObject operation to convert an Archive object in a bucket for which real-time access of Archive objects is not enabled, the object must be restored first, and you are charged for the restoration.
For more information, see Data processing fees.
Data retrieval fees
You are charged data retrieval fees when you access IA objects based on the size of the retrieved IA data. You are charged additional fees when you restore Archive, Cold Archive, and Deep Cold Archive objects. If real-time access of Archive objects is enabled for a bucket, you are charged when you access Archive objects in real time. The data retrieval fees and outbound traffic fees are separately calculated. If a Standard object is accessed more than once per month, converting the storage class of the object to IA, Archive, Cold Archive, or Deep Cold Archive may cause higher costs.
Temporary storage fees
If you restore a Cold Archive or Deep Cold Archive object, a Standard replica of the object is created to facilitate access. You are charged temporary storage fees of the replica for its duration as a Standard object before the restoration period ends.
FAQ
Can I convert the storage class of an object from IA to Standard by configuring a lifecycle rule based on the last modified time?
No, you cannot use a lifecycle rule to convert the storage class of an object from IA to Standard. You can use one of the following methods to convert the storage class of an object from IA to Standard:
Call the CopyObject operation
You can call the CopyObject operation to convert the storage class of an object from IA to Standard. For more information, see Call CopyObject to manually convert the storage classes of objects.
Use ossutil
You can use ossutil to run the set-meta command and specify the X-Oss-Storage-Class option. This way, you can convert the storage class of one or more objects from IA to Standard. For more information, see Configure or update object metadata.