- 28 Feb 2025
- 3 Minutes to read
- Print
- PDF
Object Replication With the Wasabi S3 API
- Updated on 28 Feb 2025
- 3 Minutes to read
- Print
- PDF
PUT Object Replication
Wasabi supports functionality for replication configuration with:
One source and one destination bucket (without filters)
One source and one destination bucket (with filters)
One source and multiple destination buckets
In addition, Wasabi supports functionality for updating an existing replication configuration.
Replication Configuration With One Source and One Destination Bucket (Without Filters)
PUT https://s3.<region>.wasabisys.com/my-replication-source?replication
Request body:
<?xml version="1.0" encoding="UTF-8"?>
<ReplicationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Role></Role>
<Rule>
<ID>job1</ID>
<Priority>1</Priority>
<Status>Enabled</Status>
<DeleteMarkerReplication>
<Status>Enabled</Status>
</DeleteMarkerReplication>
<Destination>
<Bucket>arn:aws:s3:::my-replication-destination</Bucket>
</Destination>
<Filter>
</Filter>
</Rule>
</ReplicationConfiguration>
Status: 200 OK
Notes:
Make sure both the source and destination buckets match the same bucket-property while scheduling the replication configuration.
Non-versioned source —> Non-versioned destination
Versioned source —> Versioned destination
Only new objects (uploaded after scheduling the replication configuration) will be replicated to the destination bucket.
To replicate the existing objects from the source to the destination, you need to initiate the following API only after scheduling the replication configuration.
PUT https://s3.<region>.wasabisys.com/my-replication-source?manifestCreateAndProcess
Response body:
<?xml version="1.0" encoding="UTF-8"?>
<ManifestCreateAndProcess>jobId : DHZsWBhwMUg9euZyFg7eahv4</ManifestCreateAndProcess>
Status: 200 OK
Replication Configuration With One Source and One Destination Bucket (With Filters)
In this example, objects that satisfy both conditions (prefix as AA- and tag “key1-value1”) will be replicated to the destination bucket.
PUT https://s3.<region>.wasabisys.com/my-replication-source?replication
Request body:
<?xml version="1.0" encoding="UTF-8"?>
<ReplicationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Role></Role>
<Rule>
<ID>job1</ID>
<Priority>1</Priority>
<Status>Enabled</Status>
<DeleteMarkerReplication>
<Status>Disabled</Status>
</DeleteMarkerReplication>
<Destination>
<Bucket>arn:aws:s3:::my-replication-destination</Bucket>
</Destination>
<Filter>
<And>
<Prefix>AA-</Prefix>
<Tag>
<Key>key1</Key>
<Value>value1</Value>
</Tag>
</And>
</Filter>
</Rule>
</ReplicationConfiguration>
Status: 200 OK
Replication Configuration With One Source and Multiple Destinations
PUT https://s3.<region>.wasabisys.com/my-replication-source?replication
Request body:
<?xml version="1.0" encoding="UTF-8"?>
<ReplicationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Role></Role>
<Rule>
<ID>job1</ID>
<Priority>1</Priority>
<Status>Enabled</Status>
<DeleteMarkerReplication>
<Status>Enabled</Status>
</DeleteMarkerReplication>
<Destination>
<Bucket>arn:aws:s3:::my-replication-destination-1</Bucket>
</Destination>
<Filter></Filter>
</Rule>
<Rule>
<ID>job2</ID>
<Priority>1</Priority>
<Status>Enabled</Status>
<DeleteMarkerReplication>
<Status>Enabled</Status>
</DeleteMarkerReplication>
<Destination>
<Bucket>arn:aws:s3:::my-replication-destination-2</Bucket>
</Destination>
<Filter></Filter>
</Rule>
</ReplicationConfiguration>
Status: 200 OK
Updating an Existing Replication Configuration
The replication configuration will replace an existing configuration. In this example, an existing replication configuration maps job2 to my-replication-destination-2, and the update changes the replication configuration to map job2 to my-replication-destination-3.
PUT https://s3.<region>.wasabisys.com/my-replication-source?replication
Request body:
<?xml version="1.0" encoding="UTF-8"?>
<ReplicationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Role></Role>
<Rule>
<ID>job1</ID>
<Priority>1</Priority>
<Status>Enabled</Status>
<DeleteMarkerReplication>
<Status>Enabled</Status>
</DeleteMarkerReplication>
<Destination>
<Bucket>arn:aws:s3:::my-replication-destination-1</Bucket>
</Destination>
<Filter></Filter>
</Rule>
<Rule>
<ID>job2</ID>
<Priority>1</Priority>
<Status>Enabled</Status>
<DeleteMarkerReplication>
<Status>Enabled</Status>
</DeleteMarkerReplication>
<Destination>
<Bucket>arn:aws:s3:::my-replication-destination-3</Bucket>
</Destination>
<Filter></Filter>
</Rule>
</ReplicationConfiguration>
Status: 200 OK
GET Object Replication
GET https://s3.<region>.wasabisys.com/my-replication-source?replication
Response body:
<?xml version="1.0" encoding="UTF-8"?>
<ReplicationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Role></Role>
<Rule>
<ID>job1</ID>
<Priority>1</Priority>
<Status>Enabled</Status>
<DeleteMarkerReplication>
<Status>Enabled</Status>
</DeleteMarkerReplication>
<Destination>
<Bucket>arn:aws:s3:::my-replication-destination</Bucket>
</Destination>
<Filter></Filter>
</Rule>
</ReplicationConfiguration>
Status: 200 OK
DELETE Object Replication
You can delete the existing replication configuration of the bucket. This removes the entire replication configuration from the specified bucket.
DELETE https://s3.<region>.wasabisys.com/my-replication-source?replication
Status: 204 No Content
Response body: No content