Run The Migrator
Run The Migrator
This section explains various migration modes, migration patterns and continuous monitoring performed by Instance Migrator.
Migration Operations
The following are a few major operations of Instance Migrator:
CONFIGURATION_READ - Export configuration from source Nexus Repository to JSON
CONFIGURATION_WRITE - Import configuration from JSON to target Nexus Repository.
CONTENT_MIGRATION - Migrate repository content between instances (one-time bulk transfer)
CONTENT_POLLING - Continuously poll for new assets and migrate them in real-time with state tracking
ALL - Execute complete end-to-end migration workflow (config + one-time content migration)
Content Migration Patterns
Use this section to choose the content migration pattern that matches your workflow.
- Migrate All Repositories (from configuration)
This pattern automatically migrates all repositories found in the configuration file, using the repository mappings defined in the JSON configuration. See Configure the Migrator.
migrate-content
- Migrate Single Repository (with configuration mapping)
This pattern migrates a specific source repository, automatically determining the target repository from the configuration file mappings. It falls back to using the source repository name as target if no mapping is found.
migrate-content --source-repository repo1
- Migrate with Explicit Mapping
This pattern explicitly specifies both source and target repositories, bypassing the configuration file mappings.
migrate-content --source-repository repo1 --target-repository repo2
Repository Mapping and Filtering
This section describes how the migrator decides which repositories to process and where their content is written on the target instance.
- Repository Mapping
The migrator reads the configuration JSON file created by migrate-config-read and uses it to determine repository mappings. For each repository entry, it reads the source repositoryName and the target targetRepositoryName. If a target repository name is not specified, the migrator uses the source repository name.
- Repository Filtering
You can limit migration to a subset of repositories by using override-repositories. This is useful when you want to migrate selected repositories instead of the full set.
The following example parses all repositories from the configuration file but filters to only include repo1, repo3, and repo5.
config set override-repositories repo1,repo3,repo5
- Repository Type Filtering
Content migration applies only to supported hosted repositories. Repository types that do not store hosted content, such as proxy or group repositories, are not processed for content migration.
Continuous Polling Mode
After completing an initial migration, you can enable continuous polling to detect and migrate new assets as they are added to the source repository. Instance Migrator checks for new assets at the configured polling interval. The default polling interval is 60 seconds.
Note
Continuous Polling Mode requires repositories to have completed initial migration before polling can start.
Start Polling for All Repositories
Starts polling all repositories that have completed initial migration.
migrate-content-polling
Start Polling for Specific Repositories
Starts polling only the specified repositories.
migrate-content-polling --source-repository repo1 repo2 repo3
Stop Polling
Stops all active polling operations and any active migrations.
stop-migrate-content
Configuration
Set the polling interval with
--polling-interval-seconds. The default value is 60.Set the polling thread pool with
--asset-migration-polling-threads. The default value is 2.