Locally redundant storage (LRS) stores data copies within a single availability zone. To protect against zone-level failures, change a bucket from LRS to zone-redundant storage (ZRS), which distributes data across multiple availability zones.
Prerequisites
Before you begin, ensure that you have:
A bucket with its storage redundancy type set to LRS
A bucket with a storage class of Standard, Infrequent Access (IA), or Archive. You cannot change the storage redundancy type of a Cold Archive or Deep Cold Archive bucket
A bucket in one of the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), China (Hong Kong), Japan (Tokyo), Singapore, Indonesia (Jakarta), or Germany (Frankfurt)
The following RAM permissions if you are a RAM user: For more information, see Attach a custom policy to a RAM user.
oss:CreateBucketDataRedundancyTransitionoss:GetBucketDataRedundancyTransitionoss:ListBucketDataRedundancyTransitionoss:DeleteBucketDataRedundancyTransition
Limits and considerations
Review the following before you change the storage redundancy type:
Consideration | Details |
Supported direction | LRS to ZRS only. Changing from ZRS to LRS is not supported. |
Supported methods | OSS console, OSS API, and ossutil. OSS SDKs do not support this operation. |
Cold Archive and Deep Cold Archive objects | The bucket can contain Cold Archive or Deep Cold Archive objects. These objects remain stored as LRS after the change. |
Processing time | Depends on data size, number of objects, and number of parts. To reduce processing time, configure a lifecycle rule to delete unnecessary parts before you start. For more information, see Lifecycle rules. |
Fees | No fees for the change itself. After the change, storage fees are calculated at ZRS rates, which are higher than LRS rates. For pricing details, visit the OSS pricing page. |
Cross-region replication (CRR) | Changing one bucket does not change its paired bucket. To change the paired bucket, perform the operation separately. |
OSS-HDFS | If OSS-HDFS is enabled on the bucket, data managed by OSS-HDFS continues to use LRS after the change. |
Procedure
Change the storage redundancy type in the OSS console
Change the storage redundancy type by using ossutil
Task status reference
After you submit a change task, it transitions through the following states:
Task status | Description |
Queuing | The task is waiting in queue. You can cancel the task in this state. The queuing period typically lasts 2 to 3 hours but may take longer in unusual cases. |
Processing | The task is running. You cannot cancel the task or delete the bucket in this state. The estimated completion time is for reference only. |
Finished | The task is complete. You can delete the finished task. Finished tasks are retained for three months and then automatically deleted. If you delete a bucket after the change, you cannot create a bucket with the same name for at least seven days. |
Related API operations
For custom integration, call the CreateBucketDataRedundancyTransition API operation directly.