ARTIFACTORY: Migrate data from Nexus (Windows Installations) to Artifactory SaaS

ARTIFACTORY: Migrate data from Nexus (Windows Installations) to Artifactory SaaS

AuthorFullName__c
Yuvarajan Johnpaul
articleNumber
000006232
ft:sourceType
Salesforce
FirstPublishedDate
2024-11-11T09:40:42Z
lastModifiedDate
2024-11-11
VersionNumber
3
This article provides a step-by-step guide for migrating data from Nexus (Windows installations) to Artifactory Cloud. By default, the JFrog Nexus migrator tool is designed for Linux-based installations; however, the following process has been tested successfully on Windows Server 2016 and is expected to work with later versions.

 

Pre-requisites:
  • Access to the Nexus Server: Backend SSH access is required to add the necessary property to prepare the Nexus server for migration.
  • Linux Server: A Linux server is needed to execute the migration task via the script.
  • Download the Migration Script: The script can be downloaded [here]. Once downloaded, assign executable permissions to the file.

 

The latest Nexus migration script does not yet support the Windows platform. Therefore, when migrating data from Nexus on Windows servers, it is recommended that the script be run from a separate Linux machine.

To proceed, you’ll need to enable the Nexus server to accept plugin installations by adding the following property to the nexus.properties file in the Nexus data directory:
nexus.scripts.allowCreation=true


After adding this property, restart the Nexus server to apply the changes.

 

Script Execution:
  • To Configure the Source and Target
Run the following command to set up the configuration
./script.sh config

 

  • To Migrate All Data from Nexus to Artifactory

    Execute the following command to initiate full data migration
./script.sh all

Note: Upon successful execution, the script will prompt you for additional inputs. Note that the script may encounter issues recognizing a Windows path for the Nexus data directory. In that stage, simply provide a valid directory path from the Linux machine as a placeholder. The script will access the actual Nexus data directory during runtime without any issues.

Attached the screenshot of script execution that includes the hints of inputs passed:

User-added image 

Workflow of the script:

During the migration process, the script will first collect the Nexus version and configuration details by deploying the `jfrogclimigrator` Groovy plugin onto the Nexus server. This plugin will automatically generate a `migrationConfig.yaml` file, then be removed once the configuration data is successfully captured.

The script will then create `repositories.yaml` and `security.json` files based on the collected Nexus configuration, temporarily storing this information in the `migration/nexus-migrator/` directory on the executing machine.

Finally, a connection test will be conducted against the target instance. Once verified, repository creation and artifact deployment will begin.