Use create-bucket-data-redundancy-transition to start a redundancy type conversion task that upgrades a bucket from locally redundant storage (LRS) to zone-redundant storage (ZRS).
Prerequisites
Before you begin, ensure that you have:
A bucket with LRS as its current redundancy type
A bucket with a storage class of Standard, Infrequent Access (IA), or Archive
The
oss:CreateBucketDataRedundancyTransitionpermission (required for RAM users and Security Token Service (STS) credentials; Alibaba Cloud accounts have this permission by default)
For details on granting this permission, see Attach a custom policy to a RAM user.
Limitations
Supported conversions:
| From | To | Supported |
|---|---|---|
| LRS | ZRS | Yes |
| ZRS | LRS | No |
Storage class support:
| Bucket storage class | Supports conversion |
|---|---|
| Standard | Yes |
| Infrequent Access (IA) | Yes |
| Archive | Yes |
| Cold Archive | No |
| Deep Cold Archive | No |
Note: If a bucket contains Cold Archive or Deep Cold Archive objects, those objects remain stored as LRS after the conversion.
Command syntax
ossutil api create-bucket-data-redundancy-transition --bucket <value> --target-redundancy-type <value> [flags]| Parameter | Type | Description |
|---|---|---|
--bucket | string | Name of the bucket |
--target-redundancy-type | string | The redundancy type to which you want to convert the bucket. |
For all supported global flags, see Command-line options.
Note: This command maps to the CreateBucketDataRedundancyTransition API operation. For a full parameter reference, see the API documentation.
Examples
Start a conversion task for examplebucket:
ossutil api create-bucket-data-redundancy-transition --bucket examplebucket --target-redundancy-type ZRSGet the output in JSON format:
ossutil api create-bucket-data-redundancy-transition --bucket examplebucket --target-redundancy-type ZRS --output-format jsonGet the output in YAML format:
ossutil api create-bucket-data-redundancy-transition --bucket examplebucket --target-redundancy-type ZRS --output-format yaml