In this article we focus to the OSS version of Nexus. For migrate a nexus version 2 to a nexus version 3 you need to know that the minimal source version of nexus need to be the 2.14.x
So if your source Nexus 2 is previous to the 2.14 you need to upgrade that version before start the migration process.

Upgrade Nexus 2

Upgrade nexus is very easy, follow these steps:

  1. Download a the lastest Nexus
  2. from this site: https://www.sonatype.com/download-oss-sonatype All the nexus versions have a “sonatype-work” folder inside it. Create a backup of the “sonatype-work” folder for the recent downloaded nexus version and for your old nexus version.
  3. Delete the “sonatype-work” folder of the download nexus version and copy your “sonatype-work” folder from your current nexus instance.
  4. Run the new nexus versione
  5. Upgrade completed

Upgrade Nexus 2 to Nexus 3

There are three types of upgrade for nexus:

  • HTTP Download
  • File System Copying
  • File System Hard Linking

In this guide we use the Http method.

For detailed information about the Nexus 2.x to Nexus 3.x migration go to follow link:

https://books.sonatype.com/nexus-book/reference3/upgrading.html#upgrade-version-two-three

The HTTP upgrade type need to have the two instance of nexus up the Nexus 2 and the Nexus 3. This type of upgrade is cool because you can migrate from different nodes.

Steps:

  1. Go to your Nexus 2 instance, log in and from the left menu go to Capabilities under Administration
  2. Click to new and chose the capability type Upgrade: Agent
  3. Create an access token like hellowNexus and click to add.
  4. Go to the Nexus 3 intance, in the administration section and add the upgrade capability like show this video:https://youtu.be/ba4VtpusRxo?t=84
  5. Refresh you Nexus 3 page and in the left menu you will have the Upgrade item
  6. In the Url field put the ip and port of the Nexus 2 instance and concatenate this string:
http://IPNEXUS2:PORTNEXUS2/nexus/service/siesta/migrationagent
  1. In the Access token put the string that you configure in the Nexus 2 intance. For example: hellowNexus
  2. Continue with the wizard and upgrade!!!
  3. Otherwise you can find the steps in this video: https://www.youtube.com/watch?v=ba4VtpusRxo