How to Upgrade Repository Manager 3.0.0-m7 to 3.0.0 final

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.

Before Upgrading

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

You will have to determine your previous installation data directory location from the command line or by using the Nexus UI. Record this value for later use.

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 clean_cache
    Example: /app/nexus3/data/clean_cache

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

You will have to determine your previous installation data directory location from the command line or by using the Nexus UI. Record this value for later use.

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

Edit the nexus-3.0.0-03/bin/nexus.vmoptions file.

  • replace the line -Dkaraf.data=data to point to your previous data directory
    Example: -Dkaraf.data=/app/nexus3/data

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 clean_cache
Example: /app/nexus3/data/clean_cache

Start the new installation using the scripts under nexus-3.0.0-03/bin/ .

Signin to the Nexus user interface and check the log file if you notice a problem.

Determine Your Nexus 3 Data Directory From the Command Line

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 /app/nexus3/data.

Determine Your Nexus 3 Data Directory From the UI

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.

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.