* Updates and simplifies bucket replication docs * Improves doc structure * Updates to corrected images * Moving common bucket replication content to includes file * Adds MinIO Console instruction
8.1 KiB
Use the mc admin bucket remote add command to create a
replication target from each deployment to the appropriate bucket on the
destination deployment. A bucket may have multiple remote targets to
different target buckets. No two targets can resolve from one bucket to
the same remote bucket.
mc admin bucket remote add ALIAS/BUCKET \
https://RemoteUser:Password@HOSTNAME/BUCKETDESTINATION \
--service "replication"
- Replace
ALIASwith thealias <alias>of the MinIO deployment that acts as the origin for the replication. - Replace
BUCKETwith the name of the bucket to replicate from on the origin deployment. - Replacete
RemoteUserwith the user name that has thenecessary replication permissions <minio-bucket-replication-serverside-twoway-permissions> - Replace
Passwordwith the secret key for theRemoteUser. - Replace
HOSTNAMEwith the URL of the destination deployment. - Replace
BUCKETDESTINATIONwith the name of the bucket to replicate to on the destination deployment.
The command returns an ARN <Amazon Resource Name> similar to the
following:
Role ARN = 'arn:minio:replication::<UUID>:BUCKET'
Copy the ARN to use in the next step, noting the MinIO deployment.
Log in to the MinIO Console for the deployment
Select the
Managebutton for the bucket to replicateSelect the
ReplicationsectionSelect
Add Replication Rule +Complete the requested information:
Field Description Priority Enter a number value to indicate the order in which to process replication rules for the bucket. 1 indicates the highest importance. Target URL The URL of the deployment to replicate data to. Use TLS Leave the toggle in the ONposition if the destination deployment uses TLS. Otherwise, move the toggle to theOFFposition.Access Key The user name to use on the destination deployment. The user must have write access to the bucket to replicate to. Secret Key The password for the provided Access Key. Target Bucket The bucket at the destination to write the data to. The target bucket may have the same name as the origin bucket, depending on the destination bucket location. Region The AWS resource region location of the destination deployment. Replication mode
Leave the default selection of Asynchronous to allow MinIO to replicate data after the write operation completes on the origin ment. Select Synchronous to attempt to complete the replication of the object during its write operation.
While synchronous replication may result in more reliable synchronization between the origin and destination buckets, it may also increase the time of each write operation.
Bandwidth Specify the maximum amount of bandwidth the replication process can use while replicating data. Enter a number and select a data unit. Health Check Duration The maximum length of time in seconds MinIO should spend verifying the health of the replicated data on the destination bucket. Storage Class The class of storage to use on the destination deployment for the replicated data. Valid values are either STANDARDorREDUCED_REDUNDANCY.Object Filters Limit which objects to replicate from the bucket by Prefixor tags. If you enter multiple tags, the objects must match all tag values.Metadata Sync Leave selected to also replicate the object's metadata file. Otherwise, move the toggle to the Offposition.Delete Markers Leave selected to also replicate MinIO's indication that an object has been deleted and should also be marked deleted at the ation bucket. Otherwise, move the toggle to the Offposition to prevent marking the object as deleted in the destination bucket.Deletes Leave selected to allow replication of the deletion of versions of an object. Otherwise, move the toggle to the Offposition to not replicate deletion of object versions.Select
Saveto finish adding the replication rule
Use the mc replicate add command to add a new replication
rule to each MinIO deployment.
mc replicate add ALIAS/BUCKET \
--remote-bucket 'arn:minio:replication::<UUID>:DESTINATIONBUCKET' \
--replicate "delete,delete-marker,existing-objects"
Replace
ALIASwith thealias <alias>of the origin MinIO deployment. The name must match the bucket specified when creating the remote target in the previous step.Replace
BUCKETwith the name of the bucket to replicate from on the origin deployment.Replace the
--remote-bucketvalue with the ARN for the destination bucket determined in the first step. Ensure you specify the ARN created on the origin deployment. You can usemc admin bucket remote lsto list all remote ARNs configured on the deployment.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 --replicatefor more complete documentation. Omit any field to disable replication of that component.
Specify any other supported optional arguments for mc replicate add.
Go to the
Bucketssection of the MinIO ConsoleSelect the
Browsebutton for the bucket you added replication toSelect the
Uploadbutton to add a new object to the bucketSelect
Upload FileUse the interface to add a new object to the bucket
Go to the other deployment's console and select the destination bucket defined in the replication
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


