Upgrade Wizard Instructions
The upgrade wizard is meant to be used only once. Do not attempt to run the upgrade multiple times on production environments.
See Upgrade Wizard for Prerequisites
Overview
The following are an overview of the upgrade process from Nexus Repository 2 to Nexus Repository 3.
Set the Upgrade Capability To secure access to the upgrade process, both instances must have the upgrade capability configured. An access token is set in Nexus Repository 2 to use when configuring the upgrade in Nexus Repository 3.
Configure the Connection Between Instances The
Upgrade
view is available after the upgrade capability is set. This points Nexus Repository 3 to the Nexus Repository 2 instance to upgrade.Select the Content to Transfer Select the high-level content to transfer from your Nexus Repository 2 instance.
Set the Repository Defaults Set the storage to use and how Nexus Repository transfers the components.
Select the Repositories to Transfer Select or remove specific repositories to transfer. Modify the storage for specific repositories.
Run the Upgrade Nexus Repository 3 transfers the configuration and artifacts from Nexus repository 2. New artifacts added to Nexus Repository 2 during this phase are still added to the queue to transfer.
Development teams continue to use Nexus Repository 2 until the upgrade is complete.
Finalize the Upgrade Nexus Repository 3 monitors Nexus Repository 2 for new artifacts until the upgrade has been finalized. Nexus Repository 3 indexes all artifacts and is no longer read only.
Development teams switch to use Nexus Repository 3.
Before you can use the Upgrade Wizard, you will need to configure upgrade capabilities on both the Nexus Repository 2 and 3 instances.
Nexus Repository 2 - Upgrade Agent Capability
Under to Settings → Capabilities, select New under the Capabilities tab.
Select Upgrade Agent as the capability type and the Enabled checkbox.
Use the generated Access Token or provide your own. Retain this token to use when performing the upgrade.
Select Add

Nexus Repository 3 - Upgrade Capability
Under Settings → Capabilities, Create an
Upgrade
capability.Select the
Enable this capability
checkbox andCreate
capability.

In your Nexus Repository 3 instance, select the Upgrade view from the side menu. This launches the Upgrade wizard and takes you to the Overview view.
Read this information before proceeding.
Select Next to navigate to the Agent Connection view.
Enter the base URL for the Nexus Repository 2 instance. This URL must be discoverable and relative to the Nexus Repository 3 instance.
Nexus Repository 2 ships with a
/nexus
web context that must be included in the URL.Enter the Access Token when configuring the Upgrade Agent Capability in Nexus Repository 2.
The token is available in Nexus Repository 2 on the Upgrade Agent → Status tab.
Set the fetch size as the number of components requested at one time.
Setting the fetch size too high may cause out of memory errors in Nexus Repository 2. Consider reducing your fetch size to a smaller value from the default 100 components when the load on the server is of concern.
Select Next to continue.

Select the content to transfer from your Nexus Repository 2 instance. Select both the repository content and server configuration unless directed by Sonatype Support. The server configuration checkbox is required.

Step 4. Set the Repository Defauts
Configure the defaults to use for your upgrade:
Blob store Choose the blob store where the repository content should be stored.
Method Choose how the repository content should be transferred.
Select Next
to continue.

Select the repositories to transfer to Nexus Repository 3. Repositories that cannot upgrade are not selectable in the list. Select the icon in the last column to modify the upgrade per repository.
After selecting Next, review the upgrade configuration. These are the actions taken when running the upgrade.
Initiate the upgrade from the Preview screen by selecting Begin where you are directed to the progress view. The upgrade is in three phases:
Prepare Prepares both instances for the upgrade. Configuration changes made in Nexus Repository 2 after the upgrade has started are not moved to Nexus Repository 3. The progress percentage represents the number of completed steps in the phase.
Select Continue to move to the Synchronizing phase.
Synchronizing Catalogs the components set to upgrade and sets the configuration in Nexus Repository 3.
Monitor the synchronizing screen to observe progress. You may view content in Nexus Repository 3 during the transfer process however, the repositories are offline until the upgrade has been finalized.
Finish Performs the final clean up then closes the process. Nexus Repository 3 continues to check Nexus Repository 2 for new content until the upgrade has been finalized.

Once a sufficient amount of time has passed since last change to Nexus Repository 2, select continue to finalize the upgrade and move to the finishing view. Changes in Nexus Repository 2 are not no longer synchronized from this point.
Select Done to complete.

The following task run automatically after an upgrade completes to build the component search and browse indexes.
Repair - Rebuild repository browse Repair - Rebuild repository search
Components may not not be visible during this time until the task "Repo 2 Migration" finishes.
You may need to reinstall the license on the Nexus Repository instance. Use the same license file for Nexus Repository 3 as for Nexus Repository 2.
The Abort button halts the upgrade and deletes the content created during this upgrade process on the Nexus Repository 3 instance. The Nexus Repository 2 instance is not affected, however, the upgrade capability must be reset before the upgrade may be restarted.
Everything done up to this point is removed, and you must start over.
Interrupting the upgrade or shutting down either Nexus Repository instance during the upgrade requires restarting the upgrade from the beginning. Complete the steps below to reset the upgrade. A brief production outage is required to restart the servers. These steps remove the internal scheduled tasks for the upgrade and any progress made.
Select the Abort button in the upgrade wizard in Nexus Repository 3.
Shut down Nexus Repository 3.
Remove the following from the Nexus Repository 3 data directory.
Delete the content in the file storage paths and the database directory.
${work-dir}/db
Drop and recreate the PostgreSQL database when used
Reconfigure the custom properties file.
${work-dir}/etc/nexus.properties
Clear out all object-based storage from cloud environments.
Shut down Nexus Repository 2 and remove the following directory.
${work-dir}/db/migrationagent
Restart Nexus Repository 2
Delete the Upgrade: Agent capability from Nexus Repository 2.