Skip to content
Nexus3 backup and migration tool
Branch: master
Clone or download
Latest commit 4557fb3 Jun 2, 2019


GoDoc Widget Build Status Go Report Card DevOps SE Questions Docker Pulls Issues Pull requests Total downloads License Repository Size Contributors Commit activity Last commit Release date Latest Production Release Version Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Maintainability Rating Quality Gate Status Reliability Rating Security Rating Technical Debt Vulnerabilities CII Best Practices codecov BCH compliance

The aims of the n3dr tool are:

  • to backup all artifacts from a certain Nexus maven repository.
  • to migrate all artifacts from NexusA to NexusB.

How do the tests look like?

The tests start a nexus docker container. The tests will be started once the docker container is running and fake artifacts have been uploaded. Finally, all submitted artifacts will be downloaded.

How to use this tool?


One could use this docker-compose.yml and start a backup of all repositories, after modifying it, and issue:

docker-compose up


Define the password in ~/.n3dr.yaml:

n3drPass: admin123

and set the permissions to 400 by issuing:

chmod 400 ~/.n3dr.yaml


In order to read the help menu, one has to run:


The output will look as follows:

N3DR is a tool that is able to download all artifacts from
a certain Nexus3 repository.

  n3dr [command]

Available Commands:
  backup       Backup all artifacts from a Nexus3 repository
  help         Help about any command
  repositories Count the number of repositories or return their names

  -h, --help   help for n3dr

Use "n3dr [command] --help" for more information about a command.


The backup command will backup all artifacts that reside in a Nexus maven repository.

[user@localhost n3dr]$ ./n3dr backup -h
Use this command in order to backup all artifacts that
reside in a certain Nexus3 repository

  n3dr backup [flags]

  -h, --help              help for backup
  -p, --n3drPass string   The Nexus3 password (default "admin123")
  -r, --n3drRepo string   The Nexus3 repository (default "maven-releases")
  -n, --n3drURL string    The Nexus3 URL (default "http://localhost:8081")
  -u, --n3drUser string   The Nexus3 user (default "admin")


In order to get an overview of all repositories that are available in a certain Nexus3 instance, one could use the following commands:

Count the number of repositories or
count the total

  n3dr repositories [flags]

  -c, --count   Count the number of repositories
  -h, --help    help for repositories
  -n, --names   Print all repository names

Download artifacts from all repositories

go run main.go repositories --download --n3drURL http://localhost:9999

docker run --rm -e HTTPS_PROXY=some-proxy \
           -v ~/.n3dr.yaml:/home/n3dr/.n3dr.yaml \
           -v ${PWD}/nexus3backup:/download utrecht/n3dr:3.0.0 \
           backup -p pass -r maven-releases \
           -n https://some-nexus-repo -u admin

Difference with equivalent tools

There is a number of equivalent tools:

The difference is that n3dr is able to download artifacts from all Nexus3 repositories.

You can’t perform that action at this time.