Migrating Sonatype Nexus 1.9.2 to 2.7.x | Day in my life

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 personal instance of nexus and if you are planning to do this on 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 Sonatype site to check https://support.sonatype.com/entries/21701998-nexus-upgrade-notes the recommended upgrade path and it seemed daunting and no where it mentioned you can upgrade straight from 1.9.x to 2.7.x. Anyway good news is I managed to migrate my existing instance and here is how to do it.

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

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 new nexus insists on running as non-root user here is how to go about stopping the annoying message.

Below steps are for Debian linux and should work for most Debian derivatives

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

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

© Nataraj Basappa 2021