Convert the redundancy type of a bucket

Updated at:
Copy as MD

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, and oss: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

OSS console

To convert a bucket from LRS to ZRS:

  1. Log on to the OSS console.

  2. In the left-side navigation pane, click Buckets. On the Buckets page, find and click the desired bucket.

  3. In the navigation pane on the left, click Overview.

  4. On the Overview page, in the Basic Information section, click Convert to ZRS next to Redundancy Type.

  5. In the Convert Redundancy Type from LRS to ZRS panel, review the estimated completion time and click Confirm.

  6. In the Confirm dialog box, click OK.

    After submission, the task progresses through the following statuses.

    Task status

    Description

    Queuing

    The task is waiting to start.

    • You can cancel the task.

    • Queuing typically takes 2 to 3 hours but may take longer.

    Processing

    Conversion is in progress.

    • You cannot cancel the task.

    • You cannot delete the bucket during conversion.

    • The estimated completion time is approximate.

    Finished

    Conversion is complete.

    • You can delete the task.

    • Completed tasks are automatically deleted after three months. This retention period applies only to tasks in the Finished state.

    • After deleting a converted bucket, you cannot reuse the same bucket name for at least seven days.

ossutil

Use ossutil to create a redundancy conversion task. Install ossutil if you haven't already.

Example: Create a conversion task for a bucket named examplebucket.

ossutil api create-bucket-data-redundancy-transition --bucket examplebucket --target-redundancy-type ZRS

Command reference: create-bucket-data-redundancy-transition.

API reference

You can call CreateBucketDataRedundancyTransition directly. This requires calculating the request signature in your own code.

Related topics