Configure the Migrator
Use this section to choose how to provide configuration settings to the migrator. The following are the different configuration methods in the order of precedence for Instance Migrator:
Note
When configuration export uses encrypted secrets, you must provide the cipher password. Refer to Cipher Password Configuration for more details.
Key Configuration Options
The following block displays the key configuration fields that may be necessary for Instance Migrator.
# Application mode mode=CONFIGURATION_READ|CONFIGURATION_WRITE|CONTENT_MIGRATION|CONTENT_POLLING|ALL # Source Nexus instance source-nexus-url=http://localhost:8081 source-nexus-username=admin source-nexus-password=admin123 # Target cloud Nexus instance target-nexus-url=https://my-org.repository.sonatype.com target-nexus-username=myuser target-nexus-password=mypass # Target self hosted Nexus instance target-nexus-url=http://localhost:8082 target-nexus-username=admin target-nexus-password=admin123 # Configuration storage configuration-json=migration-config.json state-directory=state # HTTP timeouts (milliseconds) connection-timeout-ms=10000 read-timeout-ms=30000 # Repository filtering (optional) override-repositories=repo1,repo2,repo3
Environment Variables
Use environment variables when you want to preload settings before starting the migrator or avoid entering values interactively each time. Command-line arguments may be provided as environment variables using uppercase with underscores.
Below is an example configuration for self-hosted (OrientDB) to self-hosted (PostgreSQL) migration:
export SOURCE_NEXUS_URL=http://localhost:8081 export SOURCE_NEXUS_USERNAME=admin export SOURCE_NEXUS_PASSWORD=admin123 export TARGET_NEXUS_URL=http://localhost:8082 export TARGET_NEXUS_USERNAME=admin export TARGET_NEXUS_PASSWORD=admin123 export CONFIGURATION_JSON=my-config.json export ASSET_QUERY_THREADS=8 export ASSET_MIGRATION_THREADS=16
Application Properties
Configuration may also be provided via application.properties. This is useful when you want a file-based configuration that can be reused across runs.
The following is an example configuration for self-hosted (OrientDB) to self-hosted (PostgreSQL) migration:
source-nexus-url=http://localhost:8081 source-nexus-username=admin source-nexus-password=admin123 target-nexus-url=http://localhost:8082 target-nexus-username=admin target-nexus-password=admin123 target-cipher-password=<strong-password-minimum-24-chars> state-directory=migration-state configuration-json=nexus-config.json connection-timeout-ms=10000 read-timeout-ms=600000 asset-query-read-timeout-ms=10000 asset-query-max-retries=5 polling-interval-seconds=60 asset-query-threads=2 asset-migration-threads=16 asset-migration-polling-threads=2 transfer-complete-notification-enabled=true transfer-complete-notification-interval-hours=24
Interactive Shell
Use interactive shell configuration when you want to set or change values manually while working in the shell. You can set the configuration settings using config set command.
Below is an example configuration for self-hosted Nexus Repository to a cloud instance:
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
Cipher Password Configuration
Instance Migrator supports automatic encryption of sensitive configuration values during migration. When encrypted secrets like SMTP passwords, LDAP bind passwords and database credentials are detected in the configuration export, you must provide the cipher password that was used on the source Nexus instance. This password is transmitted to the target instance to enable it to decrypt the encrypted secrets.
Important
The migration fails with a clear error message when encrypted secrets are present and the cipher password is missing.
Password Requirements:
The password should be at least 24 characters
Use cryptographically random passwords (recommended)
Generate the password through
openssl rand -base64 32
Configuration Options:
Environment Variable (Recommended for Security):
export TARGET_CIPHER_PASSWORD=$(openssl rand -base64 32)
Application Properties:
# Generate strong password: openssl rand -base64 32 target-cipher-password=<strong-password-minimum-24-chars>
Interactive Shell:
config set target-cipher-password $(openssl rand -base64 32)
Performance And Concurrency Settings
Instance Migrator uses configurable thread pools for parallel processing. It supports configurable concurrency, batch-based asset querying, thread-safe shared state, and graceful shutdown.
Configurable Concurrency
Set
max-threadsto control parallel operations (default: 10)Batch Processing
Assets are queried in batches. It is configurable via
batch-size(default: 100)
The migrator provides three independent thread pool configurations for optimal performance. These settings help you balance migration speed against CPU, memory, network usage, and source-instance stability. In general, higher values can improve throughput, but they can also increase system load. Lower values reduce load, but may increase total migration time.
Parameter | Description |
|---|---|
| Number of threads for querying assets from source Nexus Default: 2 |
| Number of threads for migrating assets (download + upload) Default 16 |
| Number of threads for polling mode asset migration Default 2 |
You can also adjust timeout settings using connection-timeout-ms and read-timeout-ms to support slower environments or large migrations.
For conservative operation, especially when the source OrientDB instance is under memory pressure, use lower thread counts.
config set asset-query-threads 1 config set asset-migration-threads 4 config set read-timeout-ms 1200000 config set connection-timeout-ms 20000