Using SWR Enterprise Edition to Implement Cross-Region DR for Self-Built Harbor
If you need to implement remote DR for Harbor, you can use SWR Enterprise Edition. By leveraging the replication capability of Harbor, you can copy image artifacts from Harbor at a site to SWR Enterprise Edition at another site. If Harbor is abnormal, you can pull the image artifacts replicated by SWR Enterprise Edition for remote DR. To achieve this, you can take the following steps:
1. Synchronize images from Harbor to SWR Enterprise Edition.
2. Configure a custom domain name for remote DR.
Prerequisites
- You have purchased an SWR Enterprise Edition instance. For details, see Buying a Repository.
- You have set up Harbor, and the network between Harbor and SWR Enterprise Edition is connected.
- The custom domain name of the SWR Enterprise Edition instance is the same as the Harbor domain name. For details about how to configure a custom domain name, see Domain Names.
Procedure
- Create a namespace.
- Log in to the SWR console. In the upper left corner, switch to your region.
- In the navigation pane, choose Namespaces. In the upper right corner, click Create Namespace.
- Enter the name of the target project in Harbor and select the namespace type.
- Click OK.
- Configure the destination image registry on Harbor.
- Create a registry endpoint.
Table 1 Parameters for creating a registry endpoint Parameter
Description
Provider
Select Docker Registry.
Name
Enter a custom name.
Description
Enter a description as needed.
Endpoint URL
Enter the domain name of the target SWR Enterprise Edition instance in the format of https://{address-of-of-the-SWR-Enterprise-Edition-instance}.
To obtain the address, log in to the SWR console, switch to the target region in the upper left corner of the page. On the displayed page, click the name of the target repository to go to the repository details page. In the Basic Information area of the Dashboard page, obtain the access address.
Access ID
Username for accessing the instance. You can obtain the username from the table downloaded in Creating a Long-Term Credential.
Access Secret
Password for accessing the instance. You can obtain the password from the table downloaded in Creating a Long-Term Credential.
Verify Remote Cert
You are advised to deselect this option.
- Create a registry endpoint.
- Configure a replication rule.
- Choose Administration > Registries and then click NEW ENDPOINT.

- Configure the parameters.
Table 2 Parameters for creating a replication rule Parameter
Description
Name
Enter a custom name.
Description
Enter a description as needed.
Replication mode
Select Push-based. Images are pushed from the local Harbor to the destination registry.
Source resource filter
Filters images in Harbor based on the configuration. All resources are selected by default.
Destination registry
Select the registry endpoint created in 2.a.
Destination
Enter the name of the namespace created in 1. Flattening reduces the registry hierarchy during image replication. You are advised to select Flatten 1 Level.
Triggering Mode
Select an option as needed. You are advised to select Event Based.
Bandwidth
Set it to the maximum network bandwidth. –1 indicates that the network bandwidth is not limited.
Overwrite
If there are resources with the same name, specify whether to overwrite the resources at the destination.
For more information, see the Harbor official website.
- Choose Administration > Registries and then click NEW ENDPOINT.
- Select the replication rule and click REPLICATE to replicate images.

The following three scenarios are provided based on the network relationship between Harbor and SWR Enterprise Edition.
Assume that the SWR Enterprise Edition instance is in Guangzhou and the Harbor repository is in Shanghai. The table below describes three example scenarios.
|
Scenario |
Description |
Remote DR Solution |
|---|---|---|
|
Scenario 1 |
Harbor is deployed on Huawei Cloud, and SWR Enterprise Edition is accessed over the public network. |
If Harbor in Shanghai becomes faulty and images cannot be pushed or pulled, you can modify the DNS settings of the custom domain name to pull images from SWR Enterprise Edition in Guangzhou. The detailed operations are as follows:
|
|
Scenario 2 |
Harbor is not deployed on Huawei Cloud, and SWR Enterprise Edition is accessed over the public network. |
If Harbor becomes faulty, you cannot push or pull images. In this case, take the following steps:
|
|
Scenario 3 |
Harbor is not deployed on Huawei Cloud, and SWR Enterprise Edition is accessed over a private network. |
If Harbor becomes faulty, you cannot push or pull images. In this case, take the following steps:
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot

