As stated in the doco the data storage and config. is separated from the application.
This way you can just copy both the application directory (Something like /opt/nexus-oss-webapp-X.Y.Z/) and your data directory (/opt/sonatype-work/) to a new server without any trouble.
I suspect the only setting that you'll need to change before trying to restart it is the repository URL which can be done by editing sonatype-work/nexus/conf/nexus.xml.
I just moved my repo from a machine to another, and upgraded it from 1.8.x to 1.9.0 at the same time without any trouble.
One could use N3DR for migrating maven artifacts from an old to a new Nexus repository. Perhaps this section could be helpful:
"Clone" a Nexus3 repository
Suppose that one has created a new Nexus3 repository, e.g. NexusNEW
and that one would like to copy the content of the old repository,
e.g. NexusOLD, then these basic steps could be issued to "clone"
NexusOLD:
As stated in the doco the data storage and config. is separated from the application.
This way you can just copy both the application directory (Something like
/opt/nexus-oss-webapp-X.Y.Z/
) and your data directory (/opt/sonatype-work/
) to a new server without any trouble.I suspect the only setting that you'll need to change before trying to restart it is the repository URL which can be done by editing
sonatype-work/nexus/conf/nexus.xml
.I just moved my repo from a machine to another, and upgraded it from 1.8.x to 1.9.0 at the same time without any trouble.
For the most recent version of Nexus which creates a structure similar to this:
You can simply zip up both the blobs and the db directory and replace them from a fresh install of Nexus at the new location.
Don't forget to chown the files after unzipping to the appropriate permissions.
Make sure Nexus is stopped before you replace them. Once replaced, start Nexus back up it should start with no problems and start re-indexing.
One could use N3DR for migrating maven artifacts from an old to a new Nexus repository. Perhaps this section could be helpful: