Search code examples
pythonartifactory

How to copy every repository/folder from one JFrog artifactory to another JFrog artifactory using Python?


There is a package called "dohq-artifactory" in python which copies file from one to another artifactory but not folders/repositories. I have tried to copy folder with same package but It didn't work.

Please let me know how to accomplish this with python or suggest if there is any better way to accomplish this.


Solution

  • The mechanism to copy artifacts between 2 different Artifactory instances is replication (or repository import/export , however this will import the entire repository and will override existing content in the target which is not the case here).

    You can configure push replication between the 2 repositories to replicate artifacts. As you want to replicate only a single specific file, you can configure the Path prefix with the path to that artifact.

    enter image description here With the Path Prefix configured, only artifacts under that path will be replicated to the target repository. After the replication has completed and the file was deployed to the target repository, you can delete the replication configured.