December 17, 2013

Migrating Sonatype Nexus 1.9.2 to 2.7.x

Below is my experience of migrating the Nexus 1.9.2 to 2.7.0. This is my instance of Nexus, and if you are planning to do this on a production environment, take more caution.

Nexus had moved on a lot from the last version I had installed. I was forced to look at the migration as the Nexus wasn’t starting after the target box was upgraded to Java 1.7 from 1.6. I went through this link on the Sonatype site to check https://support.sonatype.com/entries/21701998-nexus-upgrade-notes, the recommended upgrade path, and it seemed daunting, and nowhere did it mention that you can upgrade straight from 1.9. x to 2.7.x. Anyway, the good news is I managed to migrate my existing instance and here is how to do it.

Comments on each section above need to be actioned in the main property file nexus.properties

The above steps will get you running Nexus on the migrated data, assuming you are starting the service as a root user by setting “RUN_AS_USER” to root. As the new Nexus insists on running as a non-root user, here is how to go about stopping the annoying message.

The steps below are for Debian Linux and should work for most Debian derivatives

The above steps allow you to run the service as the nexus user and allow the service to automatically start on the next reboot.

I had issues with getting the service started correctly, as I had created the user with a false shell. Since the Nexus startup script executes “su” to switch the user, it needs shell access, so make sure you have a default shell provided to the user.

© Nataraj Basappa 2025