Through the Replication Add-on in Artifactory Pro, Artifactory allows replication of repositories to support development by different teams distributed over distant geographical sites. The benefits of replication are:
Two main methods of replication are supported:
Push replication is used to synchronize Local Repositories, and is implemented by the Artifactory server on the near end invoking a synchronization of artifacts to the far end.
There are two ways to invoke push replication:
Replication loop to be strictly avoided
With an Enterprise license, Artifactory supports multi-push replication allowing you to replicate a local repository from a single source to multiple enterprise target sites simultaneously.
Pull replication is invoked by a remote repository, and runs according to a defined schedule to synchronize repositories (local, remote or virtual) at regular intervals.
This provides a convenient way to proactively populate a remote cache, and is very useful when waiting for new artifacts to arrive on demand (when first requested) is not desirable due to network latency.
Pull replication runs as a scheduled task.
Scheduling and Configuring Replication
Using the UI
Replication is configured via the user interface as a scheduled task. Local repositories can be configured for push replication, and remote repositories can be configured for pull replication.
All replication messages are logged in the main Artifactory log file (
Configuring Push Replication
A push replication task for a Local Repository is configured in the Replication tab of the Edit Local Repository dialog.
First, in the Cron Expression field define the replication task schedule using a valid cron expression.
The Next Replication Time will indicate update accordingly.
To add a target site for this replication, click Add to display the Replication Properties dialog, and fill in the details as follows.
Once you have configured the replication properties for each of your replication targets, the Replication tab for your repository displays them.
Configuring Pull Replication
Configuring Pull Replication for a Remote Repository is very similar to configuring Push Replication for a Local Repository. Please refer to Configuring Push Replication for details.
Replicating with REST API
Both Push and Pull Replication are supported by Artifactory's REST API. For details please refer to the following:
Once replication has been invoked, Artifactory annotates the source repository being replicated and annotates it with properties that indicate the status of the replication. These can be viewed, along with other properties that may annotate the repository, in the Properties tab of the Tree Browser.
For single push replication operations, the following properties are created/updated:
For multi-push replication operations (available to Enterprise customers only), the following properties are created/updated:
Watch the Screencast
To see the Replication in action you can watch the short demo screencast below.