It would take a lot of work to set up Push Replications manually. For many Artifactory users, the act of going through the hundreds, perhaps thousands, of replication configurations would be impossible. However, using new tools added to the JFrog CLI, it's possible to automate this task completely.
It's suggested you create a project folder to save the template files we're about to create:
[Expected output syntax]
With the "repositories.list" file, we've actually gotten all of the information we need to set up replications everywhere. The next step is to create the right template files for the CLI.
It's suggested you create a project folder to save the template files we're about to create:
mkdir replication-setup; cd replication-setupFirst, get the repositories list from the Old (Source) Artifactory. The command below saves only the repository key, which is the repository's name. The keys are all that we need to set up replications. This command will save a "repositories.list" file we'll use in the next step:
# The curl command downloads the list, the grep pulls out the "key" we need # curl -s -u admin "http://jfrog.7x.gcp/artifactory/api/repositories?type=local" | grep "key" > repositories.list
[Expected output syntax]
With the "repositories.list" file, we've actually gotten all of the information we need to set up replications everywhere. The next step is to create the right template files for the CLI.