bm admin replicate
Description
The bm admin replicate command creates and manages site replication for a set of Buckit peer sites.
Site replication mimics an active-active bucket replication, but for multiple Buckit 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 Buckit site to other sites.
bm 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.
Site replication fully synchronizes versioned objects, compared to bm mirror which operates only on the latest version of an object
Use bm admin on Buckit Deployments Only
Buckit does not support using bm admin commands with other
S3-compatible services, regardless of their claimed compatibility with Buckit
deployments.
The bm admin replicate command has the following subcommands:
Subcommand |
Description |
|---|---|
Create a new site replication configuration or expand an existing configuration. |
|
Returns information about site replication configuration. |
|
Resynchronizes content from one site to a second site if the second site has lost data. |
|
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. |
|
Modify the endpoint of the specified peer site in the site replication configuration. |
Syntax
- bm admin replicate add
Create or expand a site replication configuration. The configuration uses asynchronous site replication by default, as Buckit recommends.
To enable synchronous site replication, create the replication using this command first. Then use
bm admin replicate update --mode syncto update the configuration.Consider a multi-site Buckit topology with three separate Buckit deployments using the following aliases:
minio1,minio2, andminio3. All three sites have complete bidirectional network access and low latency between sites.bm admin replicate add minio1 minio2 minio3
The following command expands an existing site replication that includes peer sites
minio1,minio2,minio3, andminio4to an additional peer site,minio5.minio5contains 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
bm admin replicate rm, then proceed with the site replication expansion.bm admin replicate add minio1 minio2 minio3 minio4 minio5
The following command creates a new site replication configuration with ILM expiration rule synchronization between peer sites
minio1,minio2, andminio3.bm admin replicate add minio1 minio2 minio3 --replicate-ilm-expiry
The command has the following syntax:
bm [GLOBALFLAGS] admin replicate add \ ALIAS1 \ ALIAS2 \ [ALIAS3 ...] \ [--replicate-ilm-expiry]
- ALIAS
- Required
The alias of a Buckit deployment to include in site replication.
At least two Buckit 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, 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.
- bm admin replicate update
Modifies the endpoint used for an existing peer site participating in site replication.
Changed in version RELEASE.2023-01-11T03-14-16Z:
bm admin replicate editrenamed tobm admin replicate update.bm admin replicate update \ minio2 \ --deployment-id c1758167-4426-454f-9aae-5c3dfdf6df64 \ --endpoint https://minio2:9000
The command has the following syntax:
bm [GLOBALFLAGS] admin replicate update \ ALIAS \ --deployment-id [deploymentID] \ --endpoint [newEndpoint] \ --mode ["sync" | "async"] \ --enable-ilm-expiry-replication \ --disable-ilm-expiry-replication
- ALIAS
- Required
The alias of the Buckit deployment.
- --bucket-bandwidth
Set default bandwidth limit for bucket in bits per second.
Valid units include:
Bfor bytesKfor kilobytesMfor megabytesGfor gigabytesTfor terabytesKifor kibibytesMifor mibibytesGifor gibibytesTifor tebibytes
For example, the following command limits the replication on the
mybuckitdeployment to no more than 2 Gigabytes per second.bm admin replicate update mybuckit --deployment-id c1758167-4426-454f-9aae-5c3dfdf6df64 --bucket-bandwidth "2G"
- --deployment-id
- Required
The unique id of the deployment to change.
The deployment ID can be found by running
bm admin replicate info ALIAS
- --mode
- Optional
Sets the site replication mode for the specified peer site. Specify
syncfor synchronous replication orasyncfor asynchronous replication.
- bm admin replicate rm, remove
Changed in version RELEASE.2023-01-11T03-14-16Z: The
bm admin replicate removesubcommand renamed tobm admin replicate rm.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.
bm admin replicate rm \ minio2 \ --all \ --force
Remove the sites with alias names
minio5andminio6from an existing site replication configuration that includes minio2bm admin replicate rm \ minio2 \ minio5 \ minio6 \ --force
The command has the following syntax:
bm [GLOBALFLAGS] admin rm \ TARGET \ ALIAS1 \ [ALIAS2...] \ --all \ --force
- TARGET
- Required
The alias of an active Buckit 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.
- ALIAS
- Optional
The alias of an active Buckit deployment to remove from a site replication configuration. May be repeated to remove additional sites.
- bm admin replicate info
Returns information about the sites in the site replication configuration.
bm admin replicate info minio1
bm [GLOBALFLAGS] admin replicate info ALIAS
- ALIAS
- Required
The alias of an active Buckit deployment in the site replication configuration.
- bm admin replicate status
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.bm admin replicate status minio1
Display the replication status of buckets across sites for a site replication configuration that includes the site
minio1.bm admin replicate status \ minio1 \ --buckets
Display the site replication status of a bucket called
imagesacross sites for a site replication configuration that contains the siteminio1.bm admin replicate status \ minio1 \ --bucket images
Display the site replication status for the setting for a user,
janedoe, across sites for a site replication configuration that contains the siteminio1.bm admin replicate status \ minio1 \ --user janedoe
The output of the above examples resembles the following:
Bucket replication status: ● 30/30 Buckets in sync Policy replication status: ● 5/5 Policies in sync User replication status: ● 3/3 Users in sync Group replication status: No Groups present ILM Expiry Rules replication status: ● 5/5 ILM Expiry Rules in sync Object replication status: Replication status since 1 day Summary: Replicated: 0 objects (0 B) Queued: - 0 objects, (0 B) (avg: 0 objects, 0 B; max: 0 objects, 0 B) Received: 0 objects (0 B)
Display the site replication status across sites for the ILM expiration rule with rule ID of
ckok9v5b4dtgofkbi6tgfor a site replication configuration that contains the siteminio1.bm admin replicate status minio1 --ilm-expiry-rule ckok9v5b4dtgofkbi6tg
The output resembles the following:
● ILM Expiry Rule replication summary for: ckok9v5b4dtgofkbi6tg ILMExpiryRule | MINIO1 | MINIO2 ILM Expiry Rule | ✔ | ✔
bm [GLOBALFLAGS] admin replicate status \ TARGET \ [--all] \ [--buckets] \ [--bucket nameOfBucket] \ [--groups] \ [--group nameOfGroup] \ [--ilm-expiry-rules] \ [--ilm-expiry-rule <rule ID>] \ [--policies] \ [--policy nameOfPolicy] \ [--users] \ [--user accessKey]
- TARGET
- Required
The alias of an active Buckit deployment in the site replication configuration.
- --bucket
- Optional
Display the replication status of a specific bucket by including the bucket name after the flag.
- bm admin replicate resync
Resynchronizes data from one site in the replication configuration to a second site in the replication configuration in the event of lost data.
The following command starts a resynchronization process to restore
minio2fromminio1bm admin replicate resync start minio1 minio2
The following command shows the status of a resynchronization currently in progress.
bm admin replicate resync status minio1 minio2
The following command stops a resynchronization that is in progress.
bm admin replicate resync cancel minio1 minio2
bm [GLOBALFLAGS] admin replicate resync start|status|cancel ALIAS1 ALIAS2
Replace
ALIAS1with the alias for the site that has the data to restore.Replace
ALIAS2with the alias for the site that needs resynched data.
- start
Launches a new resynchronization process from one site with data to a second site that needs synchronization.
- status
Shows the status of an existing resynchronization process between two sites configured for site replication.
- cancel
Ends a resynchronization process currently in progress between two sites configured for site replication.
- alias1
The alias of an active Buckit deployment in the site replication configuration with the data you want to resync to another site.
- alias2
The alias of an active Buckit deployment in the site replication configuration that needs data resynced from another site.
Global Flags
This command supports any of the global flags.