Convert the redundancy type of a bucket
You can convert a bucket's storage redundancy from locally redundant storage (LRS) to zone-redundant storage (ZRS) to protect data against availability zone failures.
Prerequisites
-
The bucket is in a supported region: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), China (Hong Kong), Japan (Tokyo), Singapore, Indonesia (Jakarta), and Germany (Frankfurt).
-
The bucket's current redundancy type is LRS.
-
The bucket's storage class is Standard, Infrequent Access (IA), or Archive. Objects in Cold Archive or Deep Cold Archive remain in LRS after conversion. Buckets with a Cold Archive or Deep Cold Archive storage class cannot be converted.
-
The RAM user has the following permissions:
oss:CreateBucketDataRedundancyTransition,oss:GetBucketDataRedundancyTransition,oss:ListBucketDataRedundancyTransition, andoss:DeleteBucketDataRedundancyTransition. To grant these permissions, Attach a custom policy to a RAM user.
Limitations
-
Conversion direction: Conversion is supported only from LRS to ZRS and is irreversible.
-
Conversion methods: Supported through the OSS console, API, or ossutil. SDKs are not supported.
-
Conversion time: Depends on data volume, object count, and multipart uploads in the bucket. If the bucket has many incomplete parts, configure a Lifecycle rule to delete them before conversion.
-
Conversion fees: The conversion task is free. After conversion, the bucket is billed at ZRS rates, which are higher than LRS rates. For more information about pricing, see Object Storage Service pricing.
-
Cross-region replication (CRR): Converting one bucket in a CRR pair does not automatically convert the other. Convert each bucket separately.
-
OSS-HDFS service: Data in OSS-HDFS remains in LRS after conversion.
Procedure
API reference
You can call CreateBucketDataRedundancyTransition directly. This requires calculating the request signature in your own code.