1
0
mirror of https://github.com/minio/docs.git synced 2025-07-30 07:03:26 +03:00
Files
docs/source/administration/bucket-replication/enable-server-side-two-way-bucket-replication.rst
Daryl White 6482571bf2 Update mc reference docs for improved nav structure (#717)
- Adds landing pages for all two-word `mc` commands
- Nests three+ word commands under appropriate two-word commands
- Updates MinIO Client doc
- Uses description from each command to populate list of subcommand
descriptions
- Modifies toctree for MinIO Client doc and each command/subcommand to
improve left nav experienc

Closes #710
2023-02-02 16:52:36 -06:00

9.7 KiB

Enable Two-Way Server-Side Bucket Replication

minio

Table of Contents

The procedure on this page creates a new bucket replication rule for two-way "active-active" synchronization of objects between MinIO buckets.

Active-Active Replication synchronizes data between two remote clusters.

  • To configure replication between arbitrary S3-compatible services, use mc mirror.
  • To configure one-way "active-passive" replication between MinIO clusters, see minio-bucket-replication-serverside-oneway.
  • To configure multi-site "active-active" replication between MinIO clusters, see minio-bucket-replication-serverside-multi.

This tutorial covers configuring Active-Active replication between two MinIO clusters. For a tutorial on multi-site replication between three or more MinIO clusters, see minio-bucket-replication-serverside-multi.

Requirements

You must meet all of the basic requirements for bucket replication described in Bucket Replication Requirements <minio-bucket-replication-requirements>.

In addition, to set up active-active bucket replication, you must meet the following additional requirements:

Access to Both Clusters

You must have network access and login credentials with required permissions to both deployment to set up active-active bucket replication.

You can access the deployments by logging in to the MinIO Console <minio-console> for each deployment or by installing mc and using the command line.

If using the command line, use the mc alias set command to create an alias for both MinIO deployments. Alias creation requires specifying an access key for a user on the deployment. This user must have permission to create and manage users and policies on the deployment.

Specifically, ensure the user has at minimum:

  • admin:CreateUser
  • admin:ListUsers
  • admin:GetUser
  • admin:CreatePolicy
  • admin:GetPolicy
  • admin:AttachUserOrGroupPolicy

Considerations

Procedure

  • Configure Two-Way Bucket Replication Using the MinIO Console <minio-bucket-replication-two-way-minio-console-procedure>
    • Create a New Bucket Replication Rule on Each Deployment <minio-bucket-replication-two-way-minio-console-create-replication-rules>
    • Validate the Replication Configuration <minio-bucket-replication-two-way-minio-console-validate-replication-config>
  • Configure Two-Way Bucket Replication Using the Command Line <minio-bucket-replication-two-way-minio-cli-procedure>
    • Create Replication Remote Targets <minio-bucket-replication-two-way-minio-cli-create-remote-targets>
    • Create a New Bucket Replication Rule on Each Deployment <minio-bucket-replication-two-way-minio-cli-create-replication-rules>
    • Validate the Replication Configuration <minio-bucket-replication-two-way-minio-cli-verify-replication-config>

Configure Two-Way Bucket Replication Using the MinIO Console

1) Create a New Bucket Replication Rule on Each Deployment

Repeat the above steps to create a rule in the other direction.

  1. Go to the Console for the destination deployment used above.
  2. Create a replication rule from the second deployment back to the first deployment. The first deployment becomes the target deployment for the rule on the second deployment.

2) Validate the Replication Configuration

Configure Two-Way Bucket Replication Using the Command Line mc

This procedure creates two-way, active-active replication between two MinIO deployments.

This procedure assumes you have already defined an alias for each deployment as a user with the necessary replication permissions <minio-bucket-replication-serverside-twoway-permissions>.

RELEASE.2022-12-24T15-21-38Z

mc replicate add automatically creates the necessary replication targets, removing the need for using the deprecated mc admin remote bucket add command. This procedure only documents the procedure as of that release.

1) Create a New Bucket Replication Rule on Each Deployment

Repeat this step on the other MinIO deployment. Change the ALIAS and --remote-bucket values to correspond to the first deployment.

You should have two replication rules configured at the conclusion of this step - one created on each deployment that points to the bucket on the other deployment. Use the mc replicate ls command to verify the created replication rules.

2) Validate the Replication Configuration

Repeat this test by copying another object to the second deployment and verifying the object replicates to the first deployment.

Once both objects exist on both deployments, you have successfully set up two-way, active-active replication between MinIO buckets.

  • Use the mc replicate update command to modify an existing replication rule.
  • Use the mc replicate update command with the --state "disable" <mc replicate update --state> flag to disable an existing replication rule.
  • Use the mc replicate rm command to remove an existing replication rule.