To upgrade from Nexus Repository Manager 3.0.0 or newer, see our official version 3 upgrade article.
This is not an article on how to upgrade from Nexus Repository Manager 2 to Nexus Repository Manager 3. This is not an article on how to upgrade Nexus Repository Manager 3.0.0 or newer.
Nexus 3 milestone 7 is the only milestone release that can be upgraded to a newer version. Upgrading from previous milestone releases is not supported or tested.
In order to keep your upgrade as simple as possible, schedule Nexus downtime during the upgrade so that you can stop Nexus and backup important directories during the upgrade process.
Upgrade Using An Installer Executable
Always stop Nexus first before upgrading, so that backups of the data directory can be made by you during the upgrade process.
Start the installer. The installer should automatically detect an existing Nexus 3 install and ask if you would like to upgrade the previous installation.
Select No, install into a different directory.
Click Next > until you reach the screen which prompts for the Nexus Destination Directory. Enter a path to an directory where the Nexus application runtime files will reside.
Click Next > until you reach the screen which prompts for the Nexus Data Directory location. Enter the path to your previous install data directory that was determined earlier.
At this point:
- make sure the previous installation is not running and stop it if it is
- manually backup the contents of the data directory to another location
- inside the target data directory manually create an empty file named
Continue to the end of the installer steps by clicking Next > .
The installer will prompt you before it overwrites any files. Choose Yes or Yes to all to overwrite existing files.
Only in a rare exceptional case of where you may have manually modified a file inside the previous directory might it make sense to not override a file. In this case, make note of the file path, and choose to overwrite the file anyways. After the installation completes, compare the contents of any conflicting files to see if there were any modifications in your old file worth keeping.
Upgrade Using the tar.gz or zip Distribution File
Extract the distribution file. Examples:
tar xzvf nexus-installer-3.0.0-03-mac-archive.tgz tar xzvf nexus-installer-3.0.0-03-unix-archive.tar.gz 7za.exe nexus-installer-3.0.0-03-win64-archive.zip
- replace the line
-Dkaraf.data=datato point to your previous data directory
Make sure the old milestone install is not running.
Manually backup the contents of the previous Data Directory to another location
Inside your previous Data Directory, manually create an empty file named
Start the new installation using the scripts under
Signin to the Nexus user interface and check the log file if you notice a problem.
You can print the command line that started nexus from your active process list to determine your data directory.
ps -ef | grep NexusMain 20347 ttys000 0:25.28 /app/nexus3/nexus-3.0.0-b2016011501/.install4j/jre.bundle/Contents/Home/jre/bin/java -server -Dinstall4j.jvmDir=/app/nexus3/nexus-3.0.0-b2016011501/.install4j/jre.bundle/Contents/Home/jre -Dexe4j.moduleName=/app/nexus3/nexus-3.0.0-b2016011501/bin/nexus -Dinstall4j.launcherId=245 -Dinstall4j.swt=false -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Xms1200M -Xmx1200M -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Djava.net.preferIPv4Stack=true -Dkaraf.home=. -Dkaraf.base=. -Dkaraf.etc=etc -Djava.util.logging.config.file=etc/java.util.logging.properties -Dkaraf.data=/app/nexus3/data -Djava.io.tmpdir=/app/nexus3/data/tmp -Dkaraf.startLocalConsole=false -Di4j.vpt=true -classpath /app/nexus3/nexus-3.0.0-b2016011501/.install4j/i4jruntime.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/nexus-main.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/org.apache.karaf.main-4.0.4.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/org.osgi.core-6.0.0.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/org.apache.karaf.diagnostic.boot-4.0.4.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/org.apache.karaf.jaas.boot-4.0.4.jar com.install4j.runtime.launcher.UnixLauncher run 9d17dc87 org.sonatype.nexus.karaf.NexusMain
Look for the value of
karaf.data. In the above example output we can see
-Dkaraf.data=/app/nexus3/data so the location of the data directory is
Signin to Nexus as an Administrator. Navigate to Support -> System information. Find the section titled nexus-configuration. The value of the workingDirectory attribute is your data directory.