How to transfer repository configuration between Nexus instances?

Hello all,

I want to transfer the repository configuration from an existing Nexus in production environment to another Nexus instance (new installation).

To do this, I made the following “API call” against the existing Nexus:

curl -u admin:password -X GET ‘

The call is successful and I get a JSON file containing information about all 50 existing repos.
The repos consist of different formats, e.g. maven, raw, nuget, npm…

What is the easiest way now to transfer / get this JSON file / content / configuration to another Nexus instance via API? I can’t find a corresponding post command for my used API call.

I only find API post commands for creating individual repos (or groups) … but the syntax in the JSON file for post-command seems to be different …

Alternatively, I also searched for Ansible modules (ansible galaxy web site) …
But here I can’t find a module which supports the creation of all types of repositories. The majority only supports maven repos … somtimes docker, too.

So can you help me please ?

Thanks in advance,

You might need to just grab all the repository names, formats, and types from that first call, then use the format-specific apis to get the details formatted to easily create them on the other nexus instance.

1 Like