mc admin replicate
Table of Contents
The mc admin replicate
command creates and manages site replication for a set of MinIO peer sites.
Site replication mimics an active-active bucket replication, but for multiple MinIO deployments. Wherever a change occurs to IAM settings, buckets, or objects across the set of sites, the change replicates across all sites in the site replication group.
Where bucket replication manages the mirroring of particular buckets or objects from one location to another within a deployment or across deployments, site replication continuously mirrors an entire MinIO site to other sites.
mc admin replicate
only supports site replication for distributed deployments when configuring site replication.
Only one deployment can have any data when initiating a new site replication configuration.
Site replication enforces bucket versioning on all buckets, including existing buckets and any buckets added after initiating site replication.
Use mc admin
on MinIO Deployments Only
MinIO does not support using mc admin
commands with other
S3-compatible services, regardless of their claimed compatibility with MinIO
deployments.
The mc admin replicate
command has the following subcommands:
Subcommand |
Description |
---|---|
Create a new site replication configuration or expand an existing configuration. |
|
Edits the endpoint of the specified peer site in the site replication configuration. |
|
Returns information about site replication configuration. |
|
Removes an entire site replication configuration or one or more peer sites from participating in site replication. |
|
Displays the status for replicable data across participating sites. |
Create or expand a site replication configuration.
Consider a multi-site MinIO topology with three separate MinIO deployments using the following aliases: minio1
, minio2
, and minio3
.
All three sites have complete bidirectional network access and low latency between sites.
mc admin replicate add minio1 minio2 minio3
The following command explands an existing site replication that includes peer site minio1
to an additional peer site, minio5
.
minio5
contains no data.
mc admin replicate add minio1 minio5
The command has the following syntax:
mc [GLOBALFLAGS] admin replicate add \
ALIAS1 \
ALIAS2 \
[ALIAS3 ...]
The alias of a MinIO deployment to include in site replication.
At least two MinIO deployment aliases are required to create a site replication. Only the first alias can have buckets or objects. The first site can also be empty.
To expand an existing site replication to one more new replication sites, the first alias must be a peer site in the site replication set to expand. Then include one or more additional aliases to add to the existing site replication. The deployments to add must be empty.
Modifies the endpoint used for an existing peer site participating in site replication.
mc admin replicate edit \
minio2 \
--deployment-id c1758167-4426-454f-9aae-5c3dfdf6df64 \
--endpoint https://minio2:9000
The command has the following syntax:
mc [GLOBALFLAGS] admin replicate edit \
ALIAS \
--deployment-id [deploymentID] \
--endpoint [newEndpoint]
The alias of the MinIO deployment.
The unique id of the deployment to change.
The deployment ID can be found by running mc admin replicate info ALIAS
Removes one or more sites from a site replication configuration.
Remember, if you intend to re-add the site to a site replication configuration in the future, it must be empty of replicable data.
Remove site replication for all connected sites for an existing site replication configuration that includes minio2. This deletes the site replication configuration for all participating sites.
mc admin replicate remove \
minio2 \
--all \
--force
Remove the sites with alias names minio5
and minio6
from an existing site replication configuration that includes minio2
mc admin replicate remove \
minio2 \
minio5 \
minio6 \
--force \
The command has the following syntax:
mc [GLOBALFLAGS] admin remove \
TARGET \
ALIAS1 \
[ALIAS2...] \
--all \
--force
The alias of an active MinIO deployment participating in the site replication to target. Do not use an alias of a deployment to be removed, unless removing all sites from site replication.
The alias of an active MinIO deployment to remove from a site replication configuration. May be repeated to remove additional sites.
Returns information about the sites in the site replication configuration.
mc admin replicate info minio1
mc [GLOBALFLAGS] admin replicate info ALIAS
The alias of an active MinIO deployment in the site replication configuration.
Displays the status of the sites, buckets, users, groups, or policies for a site replication configuration.
Display the overall replication status for a site replication configuration that includes the site minio1
.
mc admin replicate status minio1
Display the replication status of buckets across sites for a site replication configuration that includes the site minio1
.
mc admin replicate status \
minio1 \
--buckets
Display the site replication status of a bucket called images
across sites for a site replication configuration that contains the site minio1
.
mc admin replicate status \
minio1 \
--bucket images
Display the site repliction status for the setting for a user, janedoe
, across sites for a site replication configuration that contains the site minio1
.
mc admin replicate status \
minio1 \
--user janedoe
mc [GLOBALFLAGS] admin replicate status \
TARGET \
[--all] \
[--buckets] \
[--bucket nameOfBucket] \
[--groups] \
[--group nameOfGroup] \
[--policies] \
[--policy nameOfPolicy] \
[--users] \
[--user accessKey]
The alias of an active MinIO deployment in the site replication configuration.
Display the replciation status of a specific buckt by inlcuding the bucket name after the flag.
Display the replication status of a specific group by including the group name after the flag.
The path to a JSON
formatted configuration file that
mc uses for storing data. See Configuration File for
more information on how mc uses the configuration file.
Enables JSON lines formatted output to the console.
For example:
mc --JSON COMMAND
Disables TLS/SSL certificate verification. Allows TLS connectivity to servers with invalid certificates. Exercise caution when using this option against untrusted S3 hosts.
Displays the current version of mc
.
This work is licensed under a Creative Commons Attribution 4.0 International License.
©2020-Present, MinIO, Inc.