Edit Migration Configuration [OPTIONAL]
Customize migrationConfig.yaml to adjust thread count, logging level, regex rules, and checksum calculation settings.
After you run the migrator tool with the config option, the migrator tool creates the migrationConfig.yaml file inside the folder, <working directory>/migration/nexus-migrator.
The following example shows a sample migrationConfig.yaml file.
config:
artifactory:
serverId: Arty
migrator:
threads: 2
workDir: /root/.jfrog
defaultPassword: xxxxxxxxxxxx
checksumCalc: false
logging: INFO
security:
convertExternalUsersGroupsToInternal: false
repoRegex:
- source: ^[0-9](.*) $
target: m-[REPO]
userRegex:
- source: ^[0-9](.*) $
target: m-[USER]
- source: \s
target: '-'
groupRegex:
- source: ^[0-9](.*) $
target: m-[GROUP]
- source: \s
target: '-'
ldapRegex:
- source: ^[0-9](.*) $
target: m-[LDAP]
- source: \s
target: '-'
permRegex:
- source: ^[0-9](.*) $
target: m-[PERM]
nexus:
majorVersion: 3
minorVersion: 32
url: http://xx.xx.xx.xxx:8081
username: admin
password: xxxxxx
dataDir: /opt/sonatype-work/nexus3/Note
The Nexus URL must reach Nexus directly to resolve the Nexus version. Point the URL to the Nexus application port, not a proxy port. A reverse proxy or redirect may cause the connection to fail.
Warning
Enabling checksum for artifact upload increases memory utilization. Verify that the Nexus machine has sufficient free resources before setting checksumCalc: true.
Thread Configuration
Update the threads value under migrator in the YAML file to set the number of threads for the migrator tool. By default, threads are set to half the number of cores in the machine. If the Nexus Repository Manager machine becomes sluggish, reduce this number and run the migrator tool again.
Regex Rules for Renaming
Update the target value under repoRegex to set the prefix added to repositories whose names start with non-alphabetic characters. Do not edit values in square brackets (such as [REPO]), because they are keywords used in Nexus. You can also add a new source and target to use a different name for a repository in Artifactory. For example, to rename repositories starting with "dfault" to "default", add a new source and target with the required values. To replace a substring in the name of a repository, user, group, LDAP settings name, LDAP group settings name, or permission, provide a regular expression in the source field and the replacement in the target field. By default, migrationConfig.yaml includes entries to replace space characters with a hyphen ( - ).
Logging Level
Update the logging value under migrator to set the logging level. The default level is INFO. Change the value to DEBUG for more detailed log messages.
External User Conversion
Set convertExternalUsersGroupsToInternal to true to convert all users and groups from an external source (for example, LDAP) to internal users and groups in Artifactory.
Updated 24 days ago
