Replicate one S3 bucket

Preparation

The cluster must have a replicator service up and running. See Configure an OpenIO Replicator Service.

Also ensure that all event-agent services are configured with check_replication_enabled=True (in the [filter:replication] section) or all buckets will be replicated regardless of the setting of each one (legacy behavior).

Get information about the bucket

Using the openio CLI:

openio bucket show bucket0
+---------------------+----------------------------+
| Field               | Value                      |
+---------------------+----------------------------+
| account             | AUTH_demo                  |
| bytes               | 57.695M                    |
| damaged_objects     | 0                          |
| missing_chunks      | 0                          |
| mtime               | 2020-06-09T08:54:51.528740 |
| objects             | 1220                       |
| replication_enabled | False                      |
+---------------------+----------------------------+

Here we can see that the asynchronous replication is not enabled for this bucket: replication_enabled is false.

Enable asynchronous replication for this bucket

Using the openio CLI:

$ openio bucket set --replication true bucket0
+---------------------+----------------------------+
| Field               | Value                      |
+---------------------+----------------------------+
| account             | AUTH_demo                  |
| bytes               | 57.695M                    |
| damaged_objects     | 0                          |
| missing_chunks      | 0                          |
| mtime               | 2020-06-09T08:54:51.528740 |
| objects             | 1220                       |
| replication_enabled | True                       |
+---------------------+----------------------------+

Note:

Objects created before enabling the asynchronous replication won’t be replicated until they are modified.

Disable the asynchronous replication

Using the openio CLI:

$ openio bucket set --replication false bucket0
+---------------------+----------------------------+
| Field               | Value                      |
+---------------------+----------------------------+
| account             | AUTH_demo                  |
| bytes               | 57.695M                    |
| damaged_objects     | 0                          |
| missing_chunks      | 0                          |
| mtime               | 2020-06-09T08:54:51.528740 |
| objects             | 1220                       |
| replication_enabled | False                      |
+---------------------+----------------------------+