Instance Migrator
Instance Migrator is a command-line utility for migrating and managing Nexus Repository instances. Use the Instance Migrator for the following migration scenarios:
Migrate from self-hosted Nexus Repository 3 to Nexus Repository Cloud
Migrate from legacy OrientDB-based Nexus Repository to self-hosted Nexus Repository that uses either H2 or PostgreSQL
Instance Migrator provides an interactive shell interface for user-friendly migration operations with support for automation via environment variables and configuration files.
Features and Key Capabilities
Configuration and Asset Migration
Export
configuration-as-codefrom source instance to the target instance. Once the desired configuration is in place, repository content is queued for direct migration from the source instance to the target instance over time using configurable parallel asset migration.Migration State Tracking
Persistent state management to track migration progress and resume operations. Detailed logging with separate tracking for successful and failed asset transfers. After content is migrated the polling features will continue to check to new assets to migrate when added to the repository to ensure consistency between instances.
Enhanced Logging and Error Handling
Separate log files for successful and failed transfers with structured logging services. The per-repository state management allows for automatic persistence and recovery. Detailed logging and graceful failure recovery with retry mechanisms for robust error handling.
Supported Migration Scenarios
The following are the migration scenarios supported:
Note
H2 databases are only appropriate for non-mission-critical deployments. Using an external PostgreSQL database is highly recommended for production deployments. See Database Options for details.
Self-Hosted OrientDB (3.70.5) to Nexus Repository Cloud
Self Hosted OrientDB (3.70.5) to Self-Hosted PostgreSQL (3.90.2 or later)
Self-Hosted OrientDB (3.70.5) to Self-Hosted H2 (3.90.2 or later)
The self-hosted migration path supports both Nexus Repository Pro and Nexus Repository Community Edition.
Requirements
Java 25
Administrator access to source instance
Administrator access to target instance
Source Nexus Repository (OrientDB) with version 3.70.5
Target Nexus Repository 3 hosted by Sonatype in the cloud
Source Nexus Repository (OrientDB) with version 3.70.5
Target Nexus Repository (H2 or PostgreSQL) with version 3.90.2 or later
Latest available version of Instance Migrator. See Downloads or Nexus Repository 3.70.x Downloads with OrientDB
Quick Start
Use this section to get started with Instance Migrator and understand the basic workflow before you begin a migration.
By default, the application runs in interactive shell mode. Use interactive shell mode to configure settings step by step and run migration commands manually.
Start interactive shell
java -jar nexus-repository-instance-migrator-<version>-SNAPSHOT.jar
Where
<version>is the released Instance Migrator version you downloaded.Configure settings using
config setcommandCheck connectivity with
statusRun migration operations with
migrate-configuration-read,migrate-configuration-write, ormigrate-contentGet help with
migrate-help
Command | Description |
|---|---|
| Check connectivity to both source and target Nexus instances |
| Read configuration from source Nexus and save to JSON |
| Load configuration from JSON and write to target Nexus |
| Migrate repository content (assets) - supports multiple usage patterns |
| Stop one or more (or all) current migrate-content or migrate-content-polling actions |
| Start continuous polling for new assets (requires completed initial migration) |
| Display current configuration values |
| Set a configuration value |
| List all available configuration keys |
| Show detailed help for migration commands |
| Show shell commands help |
| Exit the interactive shell |
Best Practices
Production Deployments: Use environment variables or
application.propertiesfor production deployments instead of interactiveconfig setcommands. See Configure the Migrator.Log Files: Ensure log files (
nexus-migrator.log,asset-transfers.log,failed-asset-transfers.log) have appropriate file system permissions.Credential Management: Consider using credential management systems or secret stores for production environments
Session Security: Each shell session does not persist history, so passwords entered are not recoverable after closing the application
Getting Started
Explore the following topics to learn about Instance Migrator:
