mc admin replicate add

Create or expand a site replication configuration. The configuration uses asynchronous site replication by default, as MinIO recommends.

To enable synchronous site replication, create the replication using this command first. Then use mc admin replicate update --mode sync to update the configuration.

Syntax

The command has the following syntax:

mc [GLOBALFLAGS] admin replicate add      \
                            ALIAS1        \
                            ALIAS2        \
                            [ALIAS3 ...]  \
                            [--replicate-ilm-expiry]

Parameters

ALIAS

Required

The alias of a MinIO AIStor deployment to include in site replication.

At least two MinIO AIStor 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 or more new peer sites, list all existing peer site aliases in the site replication set to expand. Then include one or more additional aliases to add to the existing site replication. The peers being added must be empty.

--replicate-ilm-expiry

Optional

Replicate ILM expiration rules across peers.

Global flags

This command supports any of the global flags.

Examples

Consider a multi-site MinIO AIStor topology with three separate MinIO AIStor deployments using the following aliases: myaistor1, myaistor2, and myaistor3. All three sites have complete bidirectional network access and low latency between sites.

mc admin replicate add myaistor1 myaistor2 myaistor3

The following command expands an existing site replication that includes peer sites myaistor1, myaistor2, myaistor3, and myaistor4 to an additional peer site, myaistor5. myaistor5 contains no data. List all existing peer sites first. List the site to expand to last.

If any existing sites are unreachable, first remove the unreachable sites with mc admin replicate rm, then proceed with the site replication expansion.

mc admin replicate add myaistor1 myaistor2 myaistor3 myaistor4 myaistor5

The following command creates a new site replication configuration with ILM expiration rule synchronization between peer sites myaistor1, myaistor2, and myaistor3.

mc admin replicate add myaistor1 myaistor2 myaistor3 --replicate-ilm-expiry