ARTIFACTORY: How to replicate a specific folder or a list of folders from a repository using Push Replication

AuthorFullName__c
Vaibhav Jain
articleNumber
000005857
FirstPublishedDate
2023-09-07T09:04:57Z
lastModifiedDate
2025-07-22

ARTIFACTORY: How to replicate a specific folder or a list of folders from a repository using Push Replication

In this exposition, we shall elucidate the process of replicating a designated folder from the source Artifactory to the destination Artifactory through the utilization of Push Replication. Additionally, we will explore the incorporation of exclusion patterns.

This particular scenario becomes relevant when administrators seek to limit the availability of specific folders from a source repository on the destination server. The objective is to ensure that only designated users are able to access packages contained within the specified folder.

In order to proceed with setting up the use case, we need to make sure we have the below requirements satisfied.

  1. Two Artifactory instances:- Artifactory-one and Artifactory-two with unique licenses
  2. A local repository each on the source and destination server.


Now, we can use the below steps in order to set up the replication.

  1. In the Artifactory-one local repository, deploy some packages at the folder level(make sure we have multiple folders inside this repository). Here, we have two folders namely jar-folder1 and json-folder1 in the repository.

User-added image

       2. Now Navigate to the repository settings(Administration -> Repositories -> select the repository and click on the Replications tab).
       3. Under the replications tab, enable active Replication of this repository(based on the requirement) and click on Add Replication. 

User-added image

       4. Enter the URL of the destination instance, username, and password, and Test the connection.

      5. After the connection is successful, we can use the include/exclude patterns mentioned at last of the replication tab(above Test connection).
          Here, we are only replicating the jar-   folder1 to the destination, hence we used jar-folder/* in the include patterns field and click on ‘+’ then save it.

User-added image

      6. After saving the configuration, enter the CRON expression based on your requirement(here we are using 0 0 12 * * ? that is at 12 noon everyday). Now save the Repository settings.

User-added image

       7.Once the settings are saved, either wait for the replication to occur based on the CRON job or manually run the replication by clicking on Replication icon present for the  repository.

User-added image

       8.  Now, you will see that only the folder that was a part of include pattern has been replicated from source to destination. Below is the screenshot of repository from destination server.

User-added image

In the above way, we can also add multiple include/exclude patterns and achieve the desired use case based on the requirement. 
Additionally, for more information on Push Replication and Include/exclude patterns you may refer to the below documentation.

  1. how-to-use-include-exclude-patterns and what-are-include/exclude-patterns
  2. Push Replication