Self Hosted to Cloud Migration
Self Hosted to Cloud Migration
The cloud migration workflow exports configuration from a self-hosted Nexus Repository 3 instance and imports that configuration to Nexus Repository Cloud. It migrates content from the source instance to the cloud target. The migrator supports one-time content migration and continuous polling to keep the target instance synchronized.
Take the following steps to migrate a self-hosted instance to a cloud instance:
Configure source and target connection details. See Configure the Migrator.
Run
migrate-configuration-readto export configuration from the source instance.Run
migrate-configuration-writeto import configuration to the cloud target.Run
migrate-contentto migrate repository content.Run
migrate-content-pollingto continue migrating newly added assets.
Example:
# Start interactive shell
java -jar nexus-repository-instance-migrator.jar
# Configure source and target
config set source-nexus-url http://localhost:8081
config set source-nexus-username admin
config set source-nexus-password admin123
config set target-nexus-url https://my-org.repository.sonatype.com
config set target-nexus-username myuser
config set target-nexus-password mypass
# Verify connectivity
status
# Perform migration
migrate-configuration-read # Export from source
migrate-configuration-write # Import to target
migrate-content # Transfer repository content (one-time)
stop-migrate-content # Stop ongoing content migration
# Alternative: Complete migration in one command
migrate-all # Run all operations in sequence
# For continuous monitoring and real-time migration
migrate-content-polling # Start polling for new assets
stop-migrate-content-polling # Stop polling service