# Setting Up Replication Rules for Your Container Registry

The **Replication** tab in Ace Container Registry lets you automate the synchronization of container images between your registry and external registries (e.g., AWS ECR, Azure ACR, Docker Hub). Replication ensures consistency across environments and helps in multi-cloud or hybrid setups.

## **Accessing the Replication Tab**

1. Log in to the **AceCloud Console**.
2. Select your **Project** and **Region**.
3. Navigate to **Container Registry**.
4. Click Overview.
5. Select the **Replications** tab.

![](/files/48967e3a44102414a88ee8a1a1cbfdc084cf82bf)

## **Creating a Replication Rule**

### **1. Click on Create Replication Rule**

![](/files/89a755be3430f70e0698d9b832954520c2fefe49)

### **2. Fill in Rule Details**

* **Name**: Unique name for the replication rule.
* **Description**: Optional description for identification.

### **3. Define Source Resource Filters**

* **Resource Filter Name**: Choose the repositories/images you want to replicate.
* **Tag Matching**: Define which tags should be included (e.g., v1.\*, latest).
* **Tag Excluding**: Define which tags should be excluded (e.g., dev-\*).

**Pattern Matching Syntax (Harbor Style)**

* Use \* to match any sequence of characters within a single level.
  * Example: frontend-\* matches frontend-app and frontend-ui.
* Use \*\* to match across multiple levels (recursive).
  * Example: \*\*/nginx matches prod/nginx, staging/web/nginx, etc.

### **4. Configure Resources**

* **Resource**: Choose which repository or image is included.
* **Source Registry**: Select the source registry created earlier (Docker Hub, AWS ECR, or Azure ACR).
* **Destination Namespace**: Must match the **registry name**.
* **Flattening**: Enable if you want to remove the repository hierarchy when replicating.

### **5. Save the Replication Rule**

* Review settings and click **Create Rule**.
* The rule will now appear in the Replications tab.

## **Best Practices**

* Always use **tag filters** to avoid unnecessary replication of unwanted or experimental images.
* Use **immutable rules** together with replication to ensure tags cannot be overwritten.
* Remember: **Destination Namespace must be equal to the Registry Name** for replication to succeed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acecloud.ai/knowledge-base/registry/setting-up-replication-rules-for-your-container-registry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
