1
0
mirror of https://github.com/minio/docs.git synced 2025-08-05 03:41:24 +03:00
Files
docs/source/includes/common/bucket-replication.rst

2.1 KiB

Use the mc replicate add command to add a new replication rule to each MinIO deployment.

mc replicate add ALIAS/BUCKET \
   --remote-bucket 'https://USER:PASSWORD@HOSTNAME:PORT/BUCKET' \
   --replicate "delete,delete-marker,existing-objects"
  • Replace ALIAS with the alias <alias> of the origin MinIO deployment. The name must match the bucket specified when creating the remote target in the previous step.

  • Replace BUCKET with the name of the bucket to replicate from on the origin deployment.

  • Replace the --remote-bucket to specify the remote MinIO deployment and bucket to which the ALIAS/BUCKET replicates.

    The USER:PASSWORD must correspond to a user on the remote deployment with the necessary replication permissions <minio-bucket-replication-serverside-twoway-permissions>.

    The HOSTNAME:PORT must resolve to a reachable MinIO instance on the remote deployment. The BUCKET must exist and otherwise meet all other replication requirements <minio-bucket-replication-requirements>.

  • The --replicate "delete,delete-marker,existing-objects" flag enables the following replication features:

    • Replication of Deletes <minio-replication-behavior-delete>
    • Replication of existing Objects <minio-replication-behavior-existing-objects>

    See mc replicate add --replicate for more complete documentation. Omit any field to disable replication of that component.

Specify any other supported optional arguments for mc replicate add.

Use mc cp to copy a new object to the replicated bucket on one of the deployments.

mc cp ~/foo.txt ALIAS/BUCKET

Use mc ls to verify the object exists on the destination bucket:

mc ls ALIAS/BUCKET