github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/docs/site-replication/README.md (about)

     1  # Automatic Site Replication
     2  
     3  This feature allows multiple independent MinIO sites (or clusters) that are using the same external IDentity Provider (IDP) to be configured as replicas. In this situation the set of replica sites are referred to as peer sites or just sites. When site-replication is enabled on a set of sites, the following changes are replicated to all other sites:
     4  
     5  - Creation and deletion of buckets and objects
     6  - Creation and deletion of all IAM users, groups, policies and their mappings to users or groups
     7  - Creation of STS credentials
     8  - Creation and deletion of service accounts (except those owned by the root user)
     9  - Changes to Bucket features such as:
    10    - Bucket Policies
    11    - Bucket Tags
    12    - Bucket Object-Lock configurations (including retention and legal hold configuration)
    13    - Bucket Encryption configuration
    14  
    15  > NOTE: Bucket versioning is automatically enabled for all new and existing buckets on all replicated sites.
    16  
    17  The following Bucket features will **not be replicated**, is designed to differ between sites:
    18  
    19  - Bucket notification configuration
    20  - Bucket lifecycle (ILM) configuration
    21  
    22  ## Pre-requisites
    23  
    24  - Initially, only **one** of the sites added for replication may have data. After site-replication is successfully configured, this data is replicated to the other (initially empty) sites. Subsequently, objects may be written to any of the sites, and they will be replicated to all other sites.
    25  
    26  - **Removing a site** is not allowed from a set of replicated sites once configured.
    27  - All sites must be using the **same** external IDP(s) if any.
    28  - For [SSE-S3 or SSE-KMS encryption via KMS](https://min.io/docs/minio/linux/operations/server-side-encryption.html "MinIO KMS Guide"), all sites **must**  have access to a central KMS deployment. This can be achieved via a central KES server or multiple KES servers (say one per site) connected via a central KMS (Vault) server.
    29  
    30  ## Configuring Site Replication
    31  
    32  - Configure an alias in `mc` for each of the sites. For example if you have three MinIO sites, you may run:
    33  
    34  ```sh
    35  mc alias set minio1 https://minio1.example.com:9000 adminuser adminpassword
    36  mc alias set minio2 https://minio2.example.com:9000 adminuser adminpassword
    37  mc alias set minio3 https://minio3.example.com:9000 adminuser adminpassword
    38  ```
    39  
    40  or
    41  
    42  ```sh
    43  export MC_HOST_minio1=https://adminuser:adminpassword@minio1.example.com
    44  export MC_HOST_minio2=https://adminuser:adminpassword@minio2.example.com
    45  export MC_HOST_minio3=https://adminuser:adminpassword@minio3.example.com
    46  ```
    47  
    48  - Add site replication configuration with:
    49  
    50  ```sh
    51  mc admin replicate add minio1 minio2 minio3
    52  ```
    53  
    54  - Once the above command returns success, you may query site replication configuration with:
    55  
    56  ```sh
    57  mc admin replicate info minio1
    58  ```
    59  
    60  ** Note **
    61  Previously, site replication required the root credentials of peer sites to be identical. This is no longer necessary because STS tokens are now signed with the site replicator service account credentials, thus allowing flexibility in the independent management of root accounts across sites and the ability to disable root accounts eventually.
    62  
    63  However, this means that STS tokens signed previously by root credentials will no longer be valid upon upgrading to the latest version with this change. Please re-generate them as you usually do. Additionally, if site replication is ever removed - the STS tokens will become invalid, regenerate them as you usually do.