n3dr

Nexus3 Disaster Recovery (N3DR) is a tool that is capable of downloading all artifacts from a Nexus3 server and to migrate them to another one.

This project is maintained by 030

Rubygems

./n3dr configRepository \
  -u admin \
  -p $(docker exec -it nexus3-n3dr-src cat /nexus-data/admin.password) \
  -n localhost:8081 \
  --https=false \
  --configRepoName some-rubygems \
  --configRepoType gem
downloadDir=/tmp/some-dir/some-rubygems && \
mkdir -p ${downloadDir} && \
for f in chef-17.4.25 chef-18.1.0 puppet-7.23.0 rack-3.0.4.1; do
curl -L https://rubygems.org/downloads/${f}.gem > ${downloadDir}/${f}.gem
curl -X 'POST' \
  localhost:8081/service/rest/v1/components?repository=some-rubygems \
  -s \
  -f \
  -u "admin:$(docker exec -it nexus3-n3dr-src cat /nexus-data/admin.password)" \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F "rubygems.asset=@${downloadDir}/${f}.gem;type=application/x-tar"
done
./n3dr configRepository \
  -u admin \
  -p $(docker exec -it nexus3-n3dr-dest cat /nexus-data/admin.password) \
  -n localhost:9000 \
  --https=false \
  --configRepoName some-rubygems \
  --configRepoType gem