Operational Behaviour

Operational Behaviour

This section explains how the Instance Migrator behaves during and after execution.

State Management and Persistence

Instance Migrator stores migration state in persistent state files so it can support resume behaviour and continuous polling.

Transfer Complete Notifications

Instance migrator can automatically send notifications to the target Nexus instance when repositories complete migration. This provides visibility into migration progress and integrates with the target instance's notification system.

Notifications are sent in the following two scenarios

The following codeblock describes the notification configuration options

Interactive Shell Commands:

config show
config set transfer-complete-notification-enabled true
config set transfer-complete-notification-interval-hours 12
notify repository maven-central
notify overall

Security

The migrator implements several security measures to protect sensitive credentials. Some of them are given below:

When setting passwords via config set source-nexus-password or config set target-nexus-password, the password value is never displayed in the console output. The command returns set source-nexus-password to: **** instead of showing the actual password

Intercepts and blocks any log entries containing password-related commands as the config show command masks password values in the output. History commands do not store or display any entries, file-based history is not persisted and in-memory history is disabled.

The security configuration disables application-level history. Terminal-level history is available as commands may still be recalled with up arrow within the same terminal session. However passwords entered are not saved to any file.

Note

The following security configuration in the  application.properties enhance security.

#Disable command history to prevent password storage
spring.shell.history.enabled=false
spring.shell.command.history.enabled=false

Additionally, the ShellSecurityConfig provides

Logging

Instance Migrator writes standard application logs and separate asset transfer logs during migration. The main application log records overall migrator activity. Separate asset transfer logs record successful and failed asset transfers. Logging levels and log file rotation are configurable. Passwords are masked in log output.

The migrator provides the following log outputs:

It records overall migrator activity and runtime information. By default, this log is written to logs/nexus-migrator.log.

It records successfully migrated assets and provides an audit trail for migration progress. By default, this log is written to logs/asset-transfers.log

It records asset transfer failures to help with troubleshooting and retry analysis. By default, this log is written to logs/failed-asset-transfers.log

Supports configurable logging levels for the application and migrator components.

Supports configurable log file size limits and retention history.

Use the following settings to configure the main application log:

# Log file configuration
logging.file.name=logs/nexus-migrator.log
logging.file.max-size=10MB
logging.file.max-history=30

# Log levels
logging.level.root=INFO
logging.level.com.sonatype.nexus.tools=DEBUG

Use the application log for overall migration activity. Use the asset transfer logs when you need to verify migrated assets or investigate transfer failures.