Migrating Nexus repository manager

973 views Asked by At

I want to migrate Nexus to a new server. I know this can be done relatively easy by copying the data and program directory, but I would like to keep up the old server for a while, so people can still use the old server and have time to update their build scripts, etc.

How can I keep both servers in sync, especially the repositories we host?

2

There are 2 answers

0
Chaoz On BEST ANSWER

Make the new server link the the old one and so both server addresses will work. When you don't need the second server any more, copy the data to the new server and remove the link.
By link I mean the new server address should lead to the old server, so the old one will have 2 addresses.

0
Andreas Panagiotidis On

Copy from the old Nexus server the sonatype-work directory, which includes configuration and repositories data to the new server with rsync.

Use rsync each night or on demand to synchronize. It will only copy the new artifacts from the old server to the new one and the configuration of old Nexus to the new one.

If you want to add a repository or a user to Nexus:

  • do it in the old server
  • stop the new server
  • rsync
  • start the new server

You can skip the stopping the new server and just restart after rsync, although it is of higher risk.