mavenorientdbnexus3n3dr

How to backup all Nexus 3 artifacts?


I was wondering how to download all (not one or two specified ones) artifacts from a Nexus 3 repo to local disk. In Nexus 2 it was easy since everything was stored on disk and I would just rsync all the artifacts to my local disk.

But in Nexus 3 all artifacts are stored in the OrientDB and I will have to take an other route. I was thinking about downloading them per http after getting a complete list somehow.

Does anybody has an idea on how to perform such an export?


Solution

  • I modified following groovy scirpt, which can be uploaded using the API: https://gist.github.com/kellyrob99/2d1483828c5de0e41732327ded3ab224

    To upload and execute the script I took a look at the examples: https://github.com/sonatype/nexus-book-examples/tree/nexus-3.x