diff --git a/source/administration/bucket-replication.rst b/source/administration/bucket-replication.rst index 6dd8d695..660b2370 100644 --- a/source/administration/bucket-replication.rst +++ b/source/administration/bucket-replication.rst @@ -314,6 +314,7 @@ The replication process generally has one of the following flows: :hidden: :titlesonly: + /administration/bucket-replication/bucket-replication-requirements /administration/bucket-replication/enable-server-side-one-way-bucket-replication /administration/bucket-replication/enable-server-side-two-way-bucket-replication /administration/bucket-replication/enable-server-side-multi-site-bucket-replication diff --git a/source/administration/bucket-replication/bucket-replication-requirements.rst b/source/administration/bucket-replication/bucket-replication-requirements.rst new file mode 100644 index 00000000..a8faa9ee --- /dev/null +++ b/source/administration/bucket-replication/bucket-replication-requirements.rst @@ -0,0 +1,62 @@ +.. _minio-bucket-replication-requirements: + +========================================= +Requirements to Set Up Bucket Replication +========================================= + +.. default-domain:: minio + +.. contents:: Table of Contents + :local: + :depth: 1 + +.. _minio-bucket-replication-serverside-oneway-permissions: + +Bucket replication uses rules to synchronize the contents of a bucket on one MinIO deployment to a bucket on a remote MinIO deployment. + +Replication can be done in any of the following ways: + +- :ref:`Active-Passive ` + Eligible objects replicate from the source bucket to the remote bucket. + Any changes on the remote bucket do not replicate back. +- :ref:`Active-Active ` + Changes to eligible objects of either bucket replicate to the other bucket in a two-way direction. +- :ref:`Multi-Site Active-Active ` + Changes to eligible objects on any bucket set up for bucket replication replicte to all of the other buckets. + +Ensure you meet the following prerequisites before you set up any of these replication configurations. + +Permissions Required for Setting Up Bucket Replication +------------------------------------------------------ + +.. include:: /includes/common-replication.rst + :start-after: start-replication-required-permissions + :end-before: end-replication-required-permissions + +Matching Object Encryption Settings for Bucket Replication +---------------------------------------------------------- + +.. include:: /includes/common-replication.rst + :start-after: start-replication-encrypted-objects + :end-before: end-replication-encrypted-objects + +Bucket Replication Requires MinIO Deployments +--------------------------------------------- + +.. include:: /includes/common-replication.rst + :start-after: start-replication-minio-only + :end-before: end-replication-minio-only + +Versioning Objects for Bucket Replication +----------------------------------------- + +.. include:: /includes/common-replication.rst + :start-after: start-replication-requires-versioning + :end-before: end-replication-requires-versioning + +Matching Object Locking State With Bucket Replication +----------------------------------------------------- + +.. include:: /includes/common-replication.rst + :start-after: start-replication-requires-object-locking + :end-before: end-replication-requires-object-locking \ No newline at end of file diff --git a/source/administration/bucket-replication/enable-server-side-multi-site-bucket-replication.rst b/source/administration/bucket-replication/enable-server-side-multi-site-bucket-replication.rst index 34376dd2..97d7fa1d 100644 --- a/source/administration/bucket-replication/enable-server-side-multi-site-bucket-replication.rst +++ b/source/administration/bucket-replication/enable-server-side-multi-site-bucket-replication.rst @@ -8,7 +8,7 @@ Enable Multi-Site Server-Side Bucket Replication .. contents:: Table of Contents :local: - :depth: 1 + :depth: 2 The procedure on this page configures automatic server-side bucket replication between multiple MinIO deployments. Multi-Site Active-Active replication builds on the :ref:`minio-bucket-replication-serverside-twoway` procedure with additional considerations required to ensure predictable replication behavior across all sites. @@ -39,12 +39,22 @@ Multi-Site Active-Active replication configurations can span multiple racks, dat Requirements ------------ -Install and Configure ``mc`` with Access to Both Clusters. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +You must meet all of the basic requirements for bucket replication described in :ref:`Bucket Replication Requirements `. -This procedure uses :mc:`mc` for performing operations on both the source and destination MinIO cluster. Install :mc:`mc` on a machine with network access to both source and destination deployments. See the ``mc`` :ref:`Installation Quickstart ` for instructions on downloading and installing ``mc``. +In addition, to create multi-site bucket replication set up, you must meet the following additional requirements: -Use the :mc:`mc alias` command to create an alias for both MinIO deployments. Alias creation requires specifying an access key for a user on the cluster. This user **must** have permission to create and manage users and policies on the cluster. Specifically, ensure the user has *at minimum*: +Access to All Clusters +~~~~~~~~~~~~~~~~~~~~~~ + +You must have network access and log in credentials with correct permissions to all deployments to set up multi-site active-active bucket replication. + +You can access the deployments by logging in to the :ref:`MinIO Console ` for each deployment or by installing :mc:`mc` and using the command line. + +If using the command line, use the :mc:`mc alias` command to create an alias for each MinIO deployment. +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*: - :policy-action:`admin:CreateUser` - :policy-action:`admin:ListUsers` @@ -53,178 +63,151 @@ Use the :mc:`mc alias` command to create an alias for both MinIO deployments. Al - :policy-action:`admin:GetPolicy` - :policy-action:`admin:AttachUserOrGroupPolicy` -.. _minio-bucket-replication-serverside-multi-permissions: - -Required Permissions -~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-required-permissions - :end-before: end-replication-required-permissions - -Replication Requires Matching Object Encryption Settings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-encrypted-objects - :end-before: end-replication-encrypted-objects - -Replication Requires MinIO Deployments -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-minio-only - :end-before: end-replication-minio-only - -Replication Requires Versioning -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-requires-versioning - :end-before: end-replication-requires-versioning - -Replication Requires Matching Object Locking State -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-requires-object-locking - :end-before: end-replication-requires-object-locking Considerations -------------- -Use Consistent Replication Settings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Click to expand any of the following: -MinIO supports customizing the replication configuration to enable or disable the following replication behaviors: +.. dropdown:: Use Consistent Replication Settings + :icon: fold-down -- Replication of delete operations -- Replication of delete markers -- Replication of existing objects -- Replication of metadata-only changes + MinIO supports customizing the replication configuration to enable or disable the following replication behaviors: -When configuring replication rules for a bucket, ensure that all MinIO deployments participating in multi-site replication use the *same* replication behaviors to ensure consistent and predictable synchronization of objects. + - Replication of delete operations + - Replication of delete markers + - Replication of existing objects + - Replication of metadata-only changes -Replication of Existing Objects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + When configuring replication rules for a bucket, ensure that all MinIO deployments participating in multi-site replication use the *same* replication behaviors to ensure consistent and predictable synchronization of objects. -MinIO supports automatically replicating existing objects in a bucket. +.. dropdown:: Replication of Existing Objects + :icon: fold-down -MinIO requires explicitly enabling replication of existing objects using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate` and including the ``existing-objects`` replication feature flag. This procedure includes the required flags for enabling replication of existing objects. + MinIO supports automatically replicating existing objects in a bucket. -Replication of Delete Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + MinIO requires explicitly enabling replication of existing objects using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate` and including the ``existing-objects`` replication feature flag. + This procedure includes the required flags for enabling replication of existing objects. -MinIO supports replicating delete operations onto the target bucket. Specifically, MinIO can replicate versioning :s3-docs:`Delete Markers ` and the deletion of specific versioned objects: +.. dropdown:: Replication of Delete Operations + :icon: fold-down -- For delete operations on an object, MinIO replication also creates the delete marker on the target bucket. + MinIO supports replicating delete operations onto the target bucket. + Specifically, MinIO can replicate versioning :s3-docs:`Delete Markers ` and the deletion of specific versioned objects: -- For delete operations on versions of an object, MinIO replication also deletes those versions on the target bucket. + - For delete operations on an object, MinIO replication also creates the delete marker on the target bucket. -MinIO requires explicitly enabling replication of delete operations using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate`. This procedure includes the required flags for enabling replication of delete operations and delete markers. + - For delete operations on versions of an object, MinIO replication also deletes those versions on the target bucket. -MinIO does *not* replicate delete operations resulting from the application of :ref:`lifecycle management expiration rules `. Configure matching expiration rules for the bucket on all replication sites to ensure consistent application of object expiration. + MinIO requires explicitly enabling replication of delete operations using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate`. + This procedure includes the required flags for enabling replication of delete operations and delete markers. -Procedure + MinIO does *not* replicate delete operations resulting from the application of :ref:`lifecycle management expiration rules `. + Configure matching expiration rules for the bucket on all replication sites to ensure consistent application of object expiration. + +Procedure --------- This procedure requires repeating steps for each MinIO deployment participating in the multi-site replication configuration. Depending on the number of deployments, this procedure may require significant time and care in implementation. MinIO recommends reading through the procedure *before* attempting to implement the documented steps. +- :ref:`Configure Multi-Site Bucket Replication Using the MinIO Console ` + - :ref:`Create the Replication Rules ` + - :ref:`Validate the Replication Configuration ` +- :ref:`Configure Multi-Site Bucket Replication Using the Command Line ` + - :ref:`Create Replication Remote Targets ` + - :ref:`Create New Bucket Replication Rules ` + - :ref:`Validate the Replication Configuration ` + +.. _minio-bucket-replication-multi-site-minio-console-procedure: + +Configure Multi-Site Bucket Replication Using the MinIO Console +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _minio-bucket-replication-multi-site-minio-console-create-replication-rules: + +1) Create the Replication Rules ++++++++++++++++++++++++++++++++ + +.. include:: /includes/common/bucket-replication.rst + :start-after: start-create-bucket-replication-rule-console-desc + :end-before: end-create-bucket-replication-rule-console-desc + +Repeat the above steps to create a rule from this deployment to each of the other target deployments. + +Then, repeat the above steps on each of the other deployments in the multi-site setup so that each deployment has a separate replication rule for all of the other deployments. + +.. _minio-bucket-replication-multi-site-minio-console-validate-replication-config: + +2) Validate the Replication Configuration ++++++++++++++++++++++++++++++++++++++++++ + +.. include:: /includes/common/bucket-replication.rst + :start-after: start-validate-bucket-replication-console-desc + :end-before: end-validate-bucket-replication-console-desc + +Repeat this test on each deployment by copying a new unique file and checking that the file replicates to each of the other deployments. + +.. _minio-bucket-replication-multi-site-minio-cli-procedure: + +Configure Multi-Site Bucket Replication Using the Command Line (:mc:`mc`) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + This procedure uses the placeholder ``ALIAS`` to reference the :ref:`alias ` each MinIO deployment being configured for replication. Replace these values with the appropriate alias for each MinIO deployment. This procedure assumes each alias corresponds to a user with the :ref:`necessary replication permissions `. -1) Create the Replication Remote Target -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _minio-bucket-replication-multi-site-minio-cli-create-remote-targets: -Use the :mc-cmd:`mc admin bucket remote add` command to create a replication target for the each deployment. MinIO supports *one* remote target per destination bucket. You cannot create multiple remote targets for the same destination bucket. +1) Create Replication Remote Targets +++++++++++++++++++++++++++++++++++++ -.. code-block:: shell - :class: copyable +.. include:: /includes/common/bucket-replication.rst + :start-after: start-create-replication-remote-targets-cli-desc + :end-before: end-create-replication-remote-targets-cli-desc - mc admin bucket remote add ALIAS/BUCKET \ - https://ReplicationRemoteUser:LongRandomSecretKey@HOSTNAME/BUCKET \ - --service "replication" +Repeat these instructions for each remote MinIO deployment participating in the multi-site replication configuration. -- Replace ``BUCKET`` with the name of the bucket on the ``ALIAS`` deployment to use as the replication source. Replace ``ALIAS`` with the :ref:`alias ` of the MinIO deployment on which you are configuring replication. +For example, a multi-site replication configuration consisting of three MinIO deployments ``minio1``, ``minio2``, and ``minio3`` requires repeating this step twice on each deployment. Specifically: -- Replace ``HOSTNAME`` with the URL of the remote MinIO deployment. +- The ``minio1`` deployment requires defining separate remote targets for ``minio2`` and for ``minio3``. -- Replace ``BUCKET`` with the name of the bucket on the remote deployment to use as the replication destination. +- The ``minio2`` deployment requires defining separate remote targets for ``minio1`` and for ``minio3``. -The command returns an ARN similar to the following: +- The ``minio3`` deployment requires defining separate remote targets for ``minio1`` and for ``minio2``. -.. code-block:: shell +More than three deployments requires additional remote targets on each deployment to create the required targets for each origin and destination bucket compination. - Role ARN = 'arn:minio:replication:::BUCKET' +Record the ARN generated for each remote and note which origin-destination bucket combination you generated the ARN for. -Copy the ARN string for use in the next step, noting the MinIO deployment on which it was created. +.. _minio-bucket-replication-multi-site-minio-cli-create-replication-rules: -Repeat these commands for each remote MinIO deployment participating in the multi-site replication configuration. For example, a multi-site replication configuration consisting of MinIO deployments ``Alpha``, ``Baker``, and ``Charlie`` would require repeating this step on each deployment for each remote. Specifically: +2) Create New Bucket Replication Rules +++++++++++++++++++++++++++++++++++++++ -- The ``Alpha`` deployment would perform this step once for - ``Baker`` and once for ``Charlie``. +.. include:: /includes/common/bucket-replication.rst + :start-after: start-create-bucket-replication-rule-cli-desc + :end-before: end-create-bucket-replication-rule-cli-desc -- The ``Baker`` deployment would perform this step once for ``Alpha`` and - once for ``Charlie``. +Repeat these commands for each remote MinIO deployment participating in the multi-site replication configuration. +For example, a multi-site replication configuration consisting of MinIO deployments ``minio1``, ``minio2``, and ``minio3`` would require repeating this step on each deployment for each remote. + +Specifically, in this scenario, perform this step twice on each deployment: -- The ``Charlie`` deployment would perform this step once for ``Baker`` and - once for ``Alpha``. +- On the ``minio1`` deployment, once for a rule for ``minio2`` and again for a separate rule for ``minio3``. -2) Create a New Bucket Replication Rule -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- On the ``minio2`` deployment, once for a rule for ``minio1`` and again for a separate rule for ``minio3``. -Use the :mc-cmd:`mc replicate add` command to add the new server-side -replication rule to the each MinIO deployment. +- On the ``minio3`` deployment, once for a rule for ``minio1`` and again for a separate rule for ``minio2``. -.. code-block:: shell - :class: copyable - - mc replicate add ALIAS/BUCKET \ - --remote-bucket 'arn:minio:replication:::BUCKET' \ - --replicate "delete,delete-marker,existing-objects" - -- Replace ``BUCKET`` with the name of the bucket on the ``ALIAS`` deployment to use as the replication source. Replace ``ALIAS`` with the :ref:`alias ` of the MinIO deployment on which you are configuring replication. - -- Replace the ``--remote-bucket`` value with the ARN returned in the previous step. Ensure you specify the ARN created on the ``ALIAS`` deployment. You can use :mc-cmd:`mc admin bucket remote ls` to list all remote ARNs configured on the deployment. - -- The ``--replicate "delete,delete-marker,existing-objects"`` flag enables the following replication features: - - - :ref:`Replication of Deletes ` - - :ref:`Replication of existing Objects ` - - See :mc-cmd:`mc replicate add --replicate` for more complete documentation. Omit these fields to disable replication of delete operations or replication of existing objects respectively. - -Specify any other supported optional arguments for :mc-cmd:`mc replicate add`. - -Repeat these commands for each remote MinIO deployment participating in the multi-site replication configuration. For example, a multi-site replication configuration consisting of MinIO deployments ``Alpha``, ``Baker``, and ``Charlie`` would require repeating this step on each deployment for each remote. Specifically: - -- The ``Alpha`` deployment would perform this step once for - ``Baker`` and once for ``Charlie``. - -- The ``Baker`` deployment would perform this step once for ``Alpha`` and - once for ``Charlie``. - -- The ``Charlie`` deployment would perform this step once for ``Baker`` and - once for ``Alpha``. +.. _minio-bucket-replication-multi-site-minio-cli-verify-replication-config: 3) Validate the Replication Configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++++++++++++++++++++++++++++++++++++++++++ -Use :mc-cmd:`mc cp` to copy a new object the bucket on any of the deployments: +.. include:: /includes/common/bucket-replication.rst + :start-after: start-validate-bucket-replication-cli-desc + :end-before: end-validate-bucket-replication-cli-desc -.. code-block:: shell - :class: copyable - - mc cp ~/foo.txt ALIAS/BUCKET - -Use :mc-cmd:`mc ls` to verify the object exists on each remote deployment: - -.. code-block:: shell - :class: copyable - - mc ls REMOTE/BUCKET - -Repeat this test on each of the deployments by copying a new unique file and checking the other deployments for that file. +Repeat this test on each deployment by copying a new unique file and checking that the file replicates to each of the other deployments. You can also use :mc-cmd:`mc stat` to check the file to check the current :ref:`replication stage ` of the object. diff --git a/source/administration/bucket-replication/enable-server-side-one-way-bucket-replication.rst b/source/administration/bucket-replication/enable-server-side-one-way-bucket-replication.rst index 6a2f3e6a..c55b0ab8 100644 --- a/source/administration/bucket-replication/enable-server-side-one-way-bucket-replication.rst +++ b/source/administration/bucket-replication/enable-server-side-one-way-bucket-replication.rst @@ -8,21 +8,145 @@ Enable One-Way Server-Side Bucket Replication .. contents:: Table of Contents :local: - :depth: 1 + :depth: 2 -The procedure on this page creates a new bucket replication rule for one-way synchronization of objects between MinIO buckets. +The procedure on this page creates a new bucket replication rule for one-way synchronization of objects from one MinIO bucket to another MinIO bucket. +The buckets can be on the same MinIO deployment or on separate MinIO deployments. .. image:: /images/replication/active-passive-oneway-replication.svg - :width: 450px - :alt: Active-Passive Replication synchronizes data from a source MinIO cluster to a remote MinIO cluster. + :width: 800px + :alt: Active-Passive Replication synchronizes data from a source MinIO deployment to a remote MinIO deployment. :align: center -- To configure replication between arbitrary S3-compatible services, use :mc-cmd:`mc mirror`. -- To configure two-way "active-active" replication between MinIO clusters, see :ref:`minio-bucket-replication-serverside-twoway`. +- To configure two-way "active-active" replication between MinIO buckets, see :ref:`minio-bucket-replication-serverside-twoway`. +- To configure multi-site "active-active" replication between MinIO deployments, see :ref:`minio-bucket-replication-serverside-multi` -- To configure multi-site "active-active" replication between MinIO clusters, see :ref:`minio-bucket-replication-serverside-multi` +.. note:: + + To configure replication between arbitrary S3-compatible services (not necessarily MinIO), use :mc-cmd:`mc mirror`. + + +Requirements +------------ + + +Replication requires all participating clusters meet the :ref:`following requirements `. +This procedure assumes you have reviewed and validated those requirements. + +For more details, see the :ref:`Bucket Replication Requirements ` page. + + +Considerations +-------------- + +Click to expand any of the following: + +.. dropdown:: Replication of Existing Objects + :icon: fold-down + + MinIO supports automatically replicating existing objects in a bucket. + + MinIO requires explicitly enabling replication of existing objects using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate` and including the ``existing-objects`` replication feature flag. + This procedure includes the required flags for enabling replication of existing objects. + +.. dropdown:: Replication of Delete Operations + :icon: fold-down + + MinIO supports replicating S3 ``DELETE`` operations onto the target bucket. + Specifically, MinIO can replicate versioning :s3-docs:`Delete Markers ` and the deletion of specific versioned objects: + + - For delete operations on an object, MinIO replication also creates the delete marker on the target bucket. + + - For delete operations on versions of an object, MinIO replication also deletes those versions on the target bucket. + + MinIO requires explicitly enabling replication of delete operations using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate`. + This procedure includes the required flags for enabling replication of delete operations and delete markers. + + MinIO does *not* replicate delete operations resulting from the application of :ref:`lifecycle management expiration rules `. + + See :ref:`minio-replication-behavior-delete` for more complete documentation. + +.. dropdown:: Multi-Site Replication + :icon: fold-down + + MinIO supports configuring multiple remote targets per bucket or bucket prefix. + For example, you can configure a bucket to replicate data to two or more remote MinIO deployments, where one deployment is a 1:1 copy (replication of all operations including deletions) and another is a full historical record (replication of only non-destructive write operations). + + This procedure documents one-way replication to a single remote MinIO deployment. + You can repeat this tutorial to replicate a single bucket to multiple remote targets. + +Procedure +--------- + +- :ref:`Configure One-Way Bucket Replication Using the MinIO Console ` + - :ref:`Create a New Bucket Replication Rule ` + - :ref:`Validate the Replication Configuration ` +- :ref:`Configure One-Way Bucket Replication Using the Command Line ` + - :ref:`Create a Replication Remote Target ` + - :ref:`Create a New Bucket Replication Rule ` + - :ref:`Validate the Replication Configuration ` + +.. _minio-bucket-replication-one-way-minio-console-procedure: + +Configure One-Way Bucket Replication Using the MinIO Console +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _minio-bucket-replication-one-way-minio-console-create-replication-rules: + +1) Create a New Bucket Replication Rule ++++++++++++++++++++++++++++++++++++++++ + +.. include:: /includes/common/bucket-replication.rst + :start-after: start-create-bucket-replication-rule-console-desc + :end-before: end-create-bucket-replication-rule-console-desc + +.. _minio-bucket-replication-one-way-minio-console-validate-replication-config: + +2) Validate the Replication Configuration ++++++++++++++++++++++++++++++++++++++++++ + +.. include:: /includes/common/bucket-replication.rst + :start-after: start-validate-bucket-replication-console-desc + :end-before: end-validate-bucket-replication-console-desc + +.. _minio-bucket-replication-one-way-minio-cli-procedure: + +Configure One-Way Bucket Replication Using the Command Line (:mc:`mc`) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This procedure uses the :ref:`aliases ` ``SOURCE`` and ``REMOTE`` to reference each MinIO deployment being configured for replication. +Replace these values with the appropriate alias for your target MinIO deployments. + +This procedure assumes each alias corresponds to a user with the :ref:`necessary replication permissions `. + +.. _minio-bucket-replication-one-way-minio-cli-create-remote-targets: + +1) Create a Replication Remote Target ++++++++++++++++++++++++++++++++++++++ + +.. include:: /includes/common/bucket-replication.rst + :start-after: start-create-replication-remote-targets-cli-desc + :end-before: end-create-replication-remote-targets-cli-desc + +.. _minio-bucket-replication-one-way-minio-cli-create-replication-rules: + +2) Create a New Bucket Replication Rule ++++++++++++++++++++++++++++++++++++++++ + +.. include:: /includes/common/bucket-replication.rst + :start-after: start-create-bucket-replication-rule-cli-desc + :end-before: end-create-bucket-replication-rule-cli-desc + +.. _minio-bucket-replication-one-way-minio-cli-verify-replication-config: + +3) Validate the Replication Configuration ++++++++++++++++++++++++++++++++++++++++++ + +.. include:: /includes/common/bucket-replication.rst + :start-after: start-validate-bucket-replication-cli-desc + :end-before: end-validate-bucket-replication-cli-desc .. seealso:: @@ -31,156 +155,3 @@ The procedure on this page creates a new bucket replication rule for one-way syn - Use the :mc-cmd:`mc replicate edit` command with the :mc-cmd:`--state "disable" ` flag to disable an existing replication rule. - Use the :mc-cmd:`mc replicate rm` command to remove an existing replication rule. - -.. _minio-bucket-replication-serverside-oneway-requirements: - -Requirements ------------- - -.. _minio-bucket-replication-serverside-oneway-permissions: - -Required Permissions -~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-required-permissions - :end-before: end-replication-required-permissions - -Replication Requires Matching Object Encryption Settings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-encrypted-objects - :end-before: end-replication-encrypted-objects - -Replication Requires MinIO Deployments -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-minio-only - :end-before: end-replication-minio-only - -Replication Requires Versioning -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-requires-versioning - :end-before: end-replication-requires-versioning - -Replication Requires Matching Object Locking State -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-requires-object-locking - :end-before: end-replication-requires-object-locking - -Considerations --------------- - -Replication of Existing Objects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MinIO supports automatically replicating existing objects in a bucket. - -MinIO requires explicitly enabling replication of existing objects using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate` and including the ``existing-objects`` replication feature flag. This procedure includes the required flags for enabling replication of existing objects. - -Replication of Delete Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MinIO supports replicating S3 ``DELETE`` operations onto the target bucket. Specifically, MinIO can replicate versioning :s3-docs:`Delete Markers ` and the deletion of specific versioned objects: - -- For delete operations on an object, MinIO replication also creates the delete marker on the target bucket. - -- For delete operations on versions of an object, MinIO replication also deletes those versions on the target bucket. - -MinIO requires explicitly enabling replication of delete operations using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate`. This procedure includes the required flags for enabling replication of delete operations and delete markers. - -MinIO does *not* replicate delete operations resulting from the application of :ref:`lifecycle management expiration rules `. - -See :ref:`minio-replication-behavior-delete` for more complete documentation. - -Multi-Site Replication -~~~~~~~~~~~~~~~~~~~~~~ - -MinIO supports configuring multiple remote targets per bucket or bucket prefix. For example, you can configure a bucket to replicate data to two or more remote MinIO deployments, where one deployment is a 1:1 copy (replication of all operations including deletions) and another is a full historical record (replication of only non-destructive write operations). - -This procedure documents one-way replication to a single remote MinIO deployment. You can repeat this tutorial for multiple remote targets for a single bucket. - -Procedure ---------- - -This procedure uses the :ref:`aliases ` ``SOURCE`` and ``REMOTE`` to reference each MinIO deployment being configured for replication. Replace these values with the appropriate alias for your target MinIO deployments. - -This procedure assumes each alias corresponds to a user with the :ref:`necessary replication permissions `. - -1) Create the Replication Remote Target -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use the :mc-cmd:`mc admin bucket remote add` command to create a replication target for the destination cluster. MinIO supports *one* remote target per destination bucket. You cannot create multiple remote targets for the same destination bucket. - -.. code-block:: shell - :class: copyable - - mc admin bucket remote add SOURCE/BUCKET \ - https://ReplicationRemoteUser:LongRandomSecretKey@HOSTNAME/BUCKET \ - --service "replication" - [--sync] - -- Replace ``BUCKET`` with the name of the bucket on the ``SOURCE`` deployment to use as the replication source. Replace ``SOURCE`` with the :ref:`alias ` of the MinIO deployment on which you are configuring replication. - -- Replace ``HOSTNAME`` with the URL of the ``REMOTE`` cluster. - -- Replace ``BUCKET`` with the name of the bucket on the ``REMOTE`` deployment to use as the replication destination. - -- Include the :mc-cmd:`~mc admin bucket remote add --sync` option to enable synchronous replication. Omit the option to use the default of asynchronous replication. See the reference documentation for :mc-cmd:`mc admin bucket remote add` for more information on synchronous vs asynchronous replication before using this parameter. - -The command returns an ARN similar to the following: - -.. code-block:: shell - - Role ARN = 'arn:minio:replication:::BUCKET' - -Copy the ARN string for use in the next step. - -2) Create a New Bucket Replication Rule -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use the :mc-cmd:`mc replicate add` command to add the new server-side -replication rule to the source MinIO cluster. - -.. code-block:: shell - :class: copyable - - mc replicate add SOURCE/BUCKET \ - --remote-bucket 'arn:minio:replication:::BUCKET' \ - --replicate "delete,delete-marker,existing-objects" - -- Replace ``BUCKET`` with the name of the bucket on the ``SOURCE`` deployment to use as the replication source. Replace ``SOURCE`` with the :ref:`alias ` of the MinIO deployment on which you are configuring replication. The name *must* match the bucket specified when creating the remote target in the previous step. - -- Replace the ``--remote-bucket`` value with the ARN returned in the previous step. Ensure you specify the ARN created on the ``SOURCE`` deployment. You can use :mc-cmd:`mc admin bucket remote ls` to list all remote ARNs configured on the deployment. - -- The ``--replicate "delete,delete-marker,existing-objects"`` flag enables the following replication features: - - - :ref:`Replication of Deletes ` - - :ref:`Replication of existing Objects ` - - See :mc-cmd:`mc replicate add --replicate` for more complete documentation. Omit these fields to disable replication of delete operations or replication of existing objects respectively. - -Specify any other supported optional arguments for :mc-cmd:`mc replicate add`. - -3) Validate the Replication Configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use :mc-cmd:`mc cp` to copy a new object to the source bucket. - -.. code-block:: shell - :class: copyable - - mc cp ~/foo.txt SOURCE/BUCKET - -Use :mc-cmd:`mc ls` to verify the object exists on the destination bucket: - -.. code-block:: shell - :class: copyable - - mc ls TARGET/BUCKET diff --git a/source/administration/bucket-replication/enable-server-side-two-way-bucket-replication.rst b/source/administration/bucket-replication/enable-server-side-two-way-bucket-replication.rst index 2c5dc5e2..7d9cf1b4 100644 --- a/source/administration/bucket-replication/enable-server-side-two-way-bucket-replication.rst +++ b/source/administration/bucket-replication/enable-server-side-two-way-bucket-replication.rst @@ -8,13 +8,12 @@ Enable Two-Way Server-Side Bucket Replication .. contents:: Table of Contents :local: - :depth: 1 - + :depth: 2 The procedure on this page creates a new bucket replication rule for two-way "active-active" synchronization of objects between MinIO buckets. .. image:: /images/replication/active-active-twoway-replication.svg - :width: 600px + :width: 800px :alt: Active-Active Replication synchronizes data between two remote clusters. :align: center @@ -26,26 +25,30 @@ The procedure on this page creates a new bucket replication rule for two-way "ac 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 :ref:`minio-bucket-replication-serverside-multi`. -.. seealso:: - - - Use the :mc-cmd:`mc replicate edit` command to modify an existing - replication rule. - - - Use the :mc-cmd:`mc replicate edit` command with the :mc-cmd:`--state "disable" ` flag to disable an existing replication rule. - - - Use the :mc-cmd:`mc replicate rm` command to remove an existing replication rule. .. _minio-bucket-replication-serverside-twoway-requirements: Requirements ------------ -Install and Configure ``mc`` with Access to Both Clusters. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +You must meet all of the basic requirements for bucket replication described in :ref:`Bucket Replication Requirements `. -This procedure uses :mc:`mc` for performing operations on both the source and destination MinIO cluster. Install :mc:`mc` on a machine with network access to both source and destination clusters. See the ``mc`` :ref:`Installation Quickstart ` for instructions on downloading and installing ``mc``. +In addition, to set up active-active bucket replication, you must meet the following additional requirements: -Use the :mc:`mc alias` command to create an alias for both MinIO clusters. Alias creation requires specifying an access key for a user on the cluster. This user **must** have permission to create and manage users and policies on the cluster. Specifically, ensure the user has *at minimum*: +.. _minio-bucket-replication-serverside-twoway-permissions: + +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 :ref:`MinIO Console ` for each deployment or by installing :mc:`mc` and using the command line. + +If using the command line, use the :mc:`mc alias` 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*: - :policy-action:`admin:CreateUser` - :policy-action:`admin:ListUsers` @@ -54,182 +57,154 @@ Use the :mc:`mc alias` command to create an alias for both MinIO clusters. Alias - :policy-action:`admin:GetPolicy` - :policy-action:`admin:AttachUserOrGroupPolicy` -.. _minio-bucket-replication-serverside-twoway-permissions: - -Required Permissions -~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-required-permissions - :end-before: end-replication-required-permissions - -Replication Requires Matching Object Encryption Settings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-encrypted-objects - :end-before: end-replication-encrypted-objects - -Replication Requires MinIO Deployments -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-minio-only - :end-before: end-replication-minio-only - -Replication Requires Versioning -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-requires-versioning - :end-before: end-replication-requires-versioning - -Replication Requires Matching Object Locking State -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/common-replication.rst - :start-after: start-replication-requires-object-locking - :end-before: end-replication-requires-object-locking Considerations -------------- -Use Consistent Replication Settings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. dropdown:: Use Consistent Replication Settings + :icon: fold-down -MinIO supports customizing the replication configuration to enable or disable -the following replication behaviors: + MinIO supports customizing the replication configuration to enable or disable the following replication behaviors: -- Replication of delete operations -- Replication of delete markers -- Replication of existing objects -- Replication of metadata-only changes + - Replication of delete operations + - Replication of delete markers + - Replication of existing objects + - Replication of metadata-only changes -When configuring replication rules for a bucket, ensure that both MinIO deployments participating in active-active replication use the *same* replication behaviors to ensure consistent and predictable synchronization of objects. + When configuring replication rules for a bucket, ensure that both MinIO deployments participating in active-active replication use the *same* replication behaviors to ensure consistent and predictable synchronization of objects. -Replication of Existing Objects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. dropdown:: Replication of Existing Objects + :icon: fold-down -MinIO supports automatically replicating existing objects in a bucket. + MinIO supports automatically replicating existing objects in a bucket. -MinIO requires explicitly enabling replication of existing objects using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate` and including the ``existing-objects`` replication feature flag. This procedure includes the required flags for enabling replication of existing objects. + MinIO requires explicitly enabling replication of existing objects using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate` and including the ``existing-objects`` replication feature flag. + This procedure includes the required flags for enabling replication of existing objects. -Replication of Delete Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. dropdown:: Replication of Delete Operations + :icon: fold-down -MinIO supports replicating delete operations onto the target bucket. Specifically, MinIO can replicate versioning :s3-docs:`Delete Markers ` and the deletion of specific versioned objects: + MinIO supports replicating delete operations onto the target bucket. + Specifically, MinIO can replicate versioning :s3-docs:`Delete Markers ` and the deletion of specific versioned objects: -- For delete operations on an object, MinIO replication also creates the delete marker on the target bucket. + - For delete operations on an object, MinIO replication also creates the delete marker on the target bucket. -- For delete operations on versions of an object, MinIO replication also deletes those versions on the target bucket. + - For delete operations on versions of an object, MinIO replication also deletes those versions on the target bucket. -MinIO requires explicitly enabling replication of delete operations using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate`. This procedure includes the required flags for enabling replication of delete operations and delete markers. + MinIO requires explicitly enabling replication of delete operations using the :mc-cmd:`mc replicate add --replicate` or :mc-cmd:`mc replicate edit --replicate`. + This procedure includes the required flags for enabling replication of delete operations and delete markers. -MinIO does *not* replicate delete operations resulting from the application of :ref:`lifecycle management expiration rules `. Configure matching expiration rules on both the source and destination bucket to ensure consistent application of object expiration. + MinIO does *not* replicate delete operations resulting from the application of :ref:`lifecycle management expiration rules `. + Configure matching expiration rules on both the source and destination bucket to ensure consistent application of object expiration. -See :ref:`minio-replication-behavior-delete` for more complete documentation. + See :ref:`minio-replication-behavior-delete` for more complete documentation. -Multi-Site Replication -~~~~~~~~~~~~~~~~~~~~~~ +.. dropdown:: Multi-Site Replication + :icon: fold-down -MinIO supports configuring multiple remote targets per bucket or bucket prefix. This enables configuring multi-site active-active replication between MinIO deployments. + MinIO supports configuring multiple remote targets per bucket or bucket prefix. + This enables configuring multi-site active-active replication between MinIO deployments. -This procedure covers active-active replication between *two* MinIO sites. You can repeat this procedure for each "pair" of MinIO deployments in the replication mesh. For a dedicated tutorial, see :ref:`minio-bucket-replication-serverside-multi`. + This procedure covers active-active replication between *two* MinIO sites. + You can repeat this procedure for each "pair" of MinIO deployments in the replication mesh. For a dedicated tutorial, see :ref:`minio-bucket-replication-serverside-multi`. Procedure --------- -This procedure uses the :ref:`aliases ` ``ALPHA`` and ``BAKER`` to reference each MinIO deployment being configured for replication. Replace these values with the appropriate alias for your target MinIO deployments. +- :ref:`Configure Two-Way Bucket Replication Using the MinIO Console ` + - :ref:`Create a New Bucket Replication Rule on Each Deployment ` + - :ref:`Validate the Replication Configuration ` +- :ref:`Configure Two-Way Bucket Replication Using the Command Line ` + - :ref:`Create Replication Remote Targets ` + - :ref:`Create a New Bucket Replication Rule on Each Deployment ` + - :ref:`Validate the Replication Configuration ` -This procedure assumes each alias corresponds to a user with the :ref:`necessary replication permissions `. +.. _minio-bucket-replication-two-way-minio-console-procedure: -1) Create the Replication Remote Target -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Configure Two-Way Bucket Replication Using the MinIO Console +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use the :mc-cmd:`mc admin bucket remote add` command to create a replication target for the each deployment. MinIO supports *one* remote target per destination bucket. You cannot create multiple remote targets for the same destination bucket. +.. _minio-bucket-replication-two-way-minio-console-create-replication-rules: -.. code-block:: shell - :class: copyable +1) Create a New Bucket Replication Rule on Each Deployment +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - mc admin bucket remote add ALPHA/BUCKET \ - https://ReplicationRemoteUser:LongRandomSecretKey@HOSTNAME/BUCKET \ - --service "replication" +.. include:: /includes/common/bucket-replication.rst + :start-after: start-create-bucket-replication-rule-console-desc + :end-before: end-create-bucket-replication-rule-console-desc -- Replace ``BUCKET`` with the name of the bucket on the ``ALPHA`` deployment to use as the replication source. Replace ``ALPHA`` with the :ref:`alias ` of the MinIO deployment on which you are configuring replication. +Repeat the above steps to create a rule in the other direction. + +A) Go to the Console for the destination deployment used above. +B) 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. -- Replace ``HOSTNAME`` with the URL of the ``BAKER`` deployment. +.. _minio-bucket-replication-two-way-minio-console-validate-replication-config: -- Replace ``BUCKET`` with the name of the bucket on the ``REMOTE`` deployment to use as the replication destination. +2) Validate the Replication Configuration ++++++++++++++++++++++++++++++++++++++++++ -The command returns an ARN similar to the following: +.. include:: /includes/common/bucket-replication.rst + :start-after: start-validate-bucket-replication-console-desc + :end-before: end-validate-bucket-replication-console-desc -.. code-block:: shell +.. _minio-bucket-replication-two-way-minio-cli-procedure: - Role ARN = 'arn:minio:replication:::BUCKET' +Configure Two-Way Bucket Replication Using the Command Line (:mc:`mc`) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Copy the ARN string for use in the next step, noting the MinIO deployment on which it was created. +This procecure creates two-way, active-active replication between two MinIO deployments. -Repeat this step on the second MinIO deployment, replacing the ``ALPHA`` alias with the ``BAKER`` alias and the ``HOSTNAME`` with the URL of the ``ALPHA`` deployment. +This procedure assumes you have already defined an alias for each deployment as a user with the :ref:`necessary replication permissions `. -You should have two ARNs at the conclusion of this step - one created on ``ALPHA/BUCKET`` pointing at ``BAKER/BUCKET``, and one created on ``BAKER/BUCKET`` pointing at ``ALPHA/BUCKET``. Use the :mc-cmd:`mc admin bucket remote ls` command to verify the created replication remote targets before proceeding. +.. _minio-bucket-replication-two-way-minio-cli-create-remote-targets: -2) Create a New Bucket Replication Rule -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +1) Create Replication Remote Targets +++++++++++++++++++++++++++++++++++++ -Use the :mc-cmd:`mc replicate add` command to add the new server-side -replication rule to the each MinIO deployment. +.. include:: /includes/common/bucket-replication.rst + :start-after: start-create-replication-remote-targets-cli-desc + :end-before: end-create-replication-remote-targets-cli-desc -.. code-block:: shell - :class: copyable +Repeat this step on the second MinIO deployment, reversing the origin and destination. - mc replicate add ALPHA/BUCKET \ - --remote-bucket 'arn:minio:replication:::BUCKET' \ - --replicate "delete,delete-marker,existing-objects" +You should have two ARNs at the conclusion of this step that point from each deployment to the other deployment's bucket. +Use :mc-cmd:`mc admin bucket remote ls` to verify the remote targets before proceeding. -- Replace ``BUCKET`` with the name of the bucket on the ``ALPHA`` deployment to use as the replication source. Replace ``ALPHA`` with the :ref:`alias ` of the MinIO deployment on which you are configuring replication. The name *must* match the bucket specified when creating the remote target in the previous step. +.. _minio-bucket-replication-two-way-minio-cli-create-replication-rules: -- Replace the ``--remote-bucket`` value with the ARN returned in the previous step. Ensure you specify the ARN created on the ``ALPHA`` deployment. You can use :mc-cmd:`mc admin bucket remote ls` to list all remote ARNs configured on the deployment. +2) Create a New Bucket Replication Rule on Each Deployment +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- The ``--replicate "delete,delete-marker,existing-objects"`` flag enables the following replication features: - - - :ref:`Replication of Deletes ` - - :ref:`Replication of existing Objects ` - - See :mc-cmd:`mc replicate add --replicate` for more complete documentation. Omit these fields to disable replication of delete operations or replication of existing objects respectively. +.. include:: /includes/common/bucket-replication.rst + :start-after: start-create-bucket-replication-rule-cli-desc + :end-before: end-create-bucket-replication-rule-cli-desc -Specify any other supported optional arguments for :mc-cmd:`mc replicate add`. +Repeat this step on the other MinIO deployment. +Change the alias for the different origin. +Change the ARN to the ARN generated on the second deployment for the desired bucket. -Repeat this step on the second MinIO deployment, replacing the ``ALPHA`` alias with the ``BAKER`` alias and the ``HOSTNAME`` with the URL of the ``ALPHA`` 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-cmd:`mc replicate ls` command to verify the created replication rules. -You should have two replication rules configured at the conclusion of this step - one created on ``ALPHA/BUCKET`` and one created on ``BAKER/BUCKET``. Use the :mc-cmd:`mc replicate ls` command to verify the created replication rules. +.. _minio-bucket-replication-two-way-minio-cli-verify-replication-config: 3) Validate the Replication Configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++++++++++++++++++++++++++++++++++++++++++ -Use :mc-cmd:`mc cp` to copy a new object to the ``ALPHA/BUCKET`` bucket. +.. include:: /includes/common/bucket-replication.rst + :start-after: start-validate-bucket-replication-cli-desc + :end-before: end-validate-bucket-replication-cli-desc -.. code-block:: shell - :class: copyable +Repeat this test by copying another object to the second deployment and verifying the object replicates to the first deployment. - mc cp ~/foo.txt ALPHA/BUCKET +Once both objects exist on both deployments, you have successfully set up two-way, active-active replication between MinIO buckets. -Use :mc-cmd:`mc ls` to verify the object exists on the destination bucket: +.. seealso:: -.. code-block:: shell - :class: copyable + - Use the :mc-cmd:`mc replicate edit` command to modify an existing + replication rule. - mc ls BAKER/BUCKET + - Use the :mc-cmd:`mc replicate edit` command with the :mc-cmd:`--state "disable" ` flag to disable an existing replication rule. -Repeat this test by copying a new object to the ``Baker`` source bucket. - -.. code-block:: shell - :class: copyable - - mc cp ~/otherfoo.txt BAKER/BUCKET - -Use :mc-cmd:`mc ls` to verify the object exists on the destination bucket: - -.. code-block:: shell - :class: copyable - - mc ls ALPHA/BUCKET + - Use the :mc-cmd:`mc replicate rm` command to remove an existing replication rule. \ No newline at end of file diff --git a/source/developers/dotnet/API.md b/source/developers/dotnet/API.md index 3903bbf0..c93ede16 100644 --- a/source/developers/dotnet/API.md +++ b/source/developers/dotnet/API.md @@ -137,16 +137,14 @@ MinioClient minioClient = new MinioClient() ### AWS S3 ```cs -// 1. public MinioClient(String endpoint, String accessKey, String secretKey) -MinioClient s3Client = new MinioClient("s3.amazonaws.com", - accessKey:"YOUR-ACCESSKEYID", - secretKey:"YOUR-SECRETACCESSKEY"); -// 2. Using Builder with public MinioClient(), Endpoint, Credentials & Secure connection -MinioClient minioClient = new MinioClient() - .WithEndpoint("s3.amazonaws.com") - .WithCredentials("YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY") - .WithSSL() - .Build() +// 1. Using Builder with public MinioClient(), Endpoint, Credentials, Secure connection & proxy +MinioClient s3Client = new MinioClient() + .WithEndpoint("s3.amazonaws.com") + .WithCredentials("YOUR-AWS-ACCESSKEYID", "YOUR-AWS-SECRETACCESSKEY") + .WithSSL() + .WithProxy(proxy) + .Build(); + ``` ## 2. Bucket operations diff --git a/source/glossary.rst b/source/glossary.rst index 35068f34..ce2d6b84 100644 --- a/source/glossary.rst +++ b/source/glossary.rst @@ -184,7 +184,7 @@ Glossary replication mirror - The duplication of a :ref:`bucket ` or entire :ref:`site ` to another location. + The replication of a :ref:`bucket ` or entire :ref:`site ` to another location. scanner MinIO Scanner diff --git a/source/images/replication/active-active-multi-replication.svg b/source/images/replication/active-active-multi-replication.svg index 6994bd02..afc9ad77 100644 --- a/source/images/replication/active-active-multi-replication.svg +++ b/source/images/replication/active-active-multi-replication.svg @@ -1,7 +1,7 @@ - + + viewBox="0 0 1315.7 1646.6" style="enable-background:new 0 0 1315.7 1646.6;" xml:space="preserve"> - - + + - - - - - - - + + + + + + + - + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - + + + + - - - - - - + + + + + + - + - - + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - + - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - + + - - - - - - + + + + + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + diff --git a/source/images/replication/active-active-twoway-replication.svg b/source/images/replication/active-active-twoway-replication.svg index 1745375d..510b5034 100644 --- a/source/images/replication/active-active-twoway-replication.svg +++ b/source/images/replication/active-active-twoway-replication.svg @@ -1,7 +1,7 @@ - + + viewBox="0 0 1922.5 367.5" style="enable-background:new 0 0 1922.5 367.5;" xml:space="preserve"> - - + c0,21-17,37.9-37.9,37.9L883.5,142.8z"/> - - - - - - - + + + + + + + - + - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + - + c0-0.5-0.5-0.8-1.7-0.9l-0.9-0.1c-2.4-0.3-3.6-1.4-3.6-3.2c0-2.1,1.6-3.4,4.4-3.4c1.6,0,3,0.3,4.4,1L240.4,130.5z"/> + - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - + - - - - - + + + + - + - - - + + + - - - + - - - - - - - - + + + + + + + + + + - - + + - - - - - - + C575.2,221,575.4,221,575.7,221z"/> + + + + + + - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - + + - + - - - - - + + + - + C1202.7,126.8,1202.3,126.9,1201.7,126.9z"/> + - + - + c-2.7-0.6-5.6-0.7-8.2-0.8L1150,63.2z M1223.5,154.6c0,3.4-2.7,6.2-6.2,6.2h-60.9c-3.4,0-6.2-2.7-6.2-6.2V76.7 + c0-3.4,2.7-6.2,6.2-6.2h40.9v10.4c0,8.6,6.9,15.5,15.5,15.5h10.7V154.6L1223.5,154.6z M1223.5,89.7h-10.7c-4.8,0-8.7-3.9-8.7-8.7 + V70.6h13.3c3.4,0,6.2,2.7,6.2,6.2v12.9H1223.5z"/> - + - - + - - - + + + - + C737.3,126.8,736.9,126.9,736.3,126.9z"/> + - + - + c0.2-6.5,0.4-13.3-0.2-19.7c-0.4-4.8-2.6-8.9-7.4-10.6c-0.7-0.3-1.4-0.4-2.1-0.6c-2.7-0.6-5.6-0.7-8.2-0.8L684.6,63.2z + M758.1,154.6c0,3.4-2.7,6.2-6.2,6.2H691c-3.4,0-6.2-2.7-6.2-6.2V76.7c0-3.4,2.7-6.2,6.2-6.2h41v10.4c0,8.6,6.9,15.5,15.5,15.5 + h10.7L758.1,154.6L758.1,154.6z M758.1,89.7h-10.7c-4.8,0-8.7-3.9-8.7-8.7V70.6H752c3.4,0,6.2,2.7,6.2,6.2v12.9H758.1z"/> - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - - + + + + + + - - - - - + C1004.3,329.6,1006.1,330.6,1007,332z"/> + + + + + - - - - - + + + + - + C1151.7,332.1,1152.5,332.6,1153,333.3z M1148,335.8c0,1.5,1,2.7,2.6,2.7c1.5,0,2.6-1.1,2.6-2.7c0-1.5-1-2.7-2.6-2.7 + C1149,333.2,1148,334.4,1148,335.8z"/> + - - + - - + C1196.2,328.5,1197.6,329.1,1198.5,330.2z"/> + + - - - + + + - - + + - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + - + c0-0.5-0.5-0.8-1.7-0.9l-0.9-0.1c-2.4-0.3-3.6-1.4-3.6-3.2c0-2.1,1.6-3.4,4.4-3.4c1.6,0,3,0.3,4.4,1L1842.9,130.5z"/> + - - + + - - - - - + + + + - + - - - + + + - + - + - + - - - + + + - + - + - - - + + + - + - - - - - + + + + + - - + c-0.3,0-0.4,0-0.7,0.1c-0.2,0.1-0.4,0.2-0.6,0.3s-0.3,0.3-0.4,0.4c-0.1,0.2-0.2,0.3-0.2,0.6v5H1489L1489,221.9z"/> + + diff --git a/source/images/replication/active-passive-oneway-replication.svg b/source/images/replication/active-passive-oneway-replication.svg index 2c55a060..24c08068 100644 --- a/source/images/replication/active-passive-oneway-replication.svg +++ b/source/images/replication/active-passive-oneway-replication.svg @@ -1,41 +1,10 @@ - - - - -