Overview
The migration tool provides:- Automated transfers from JFrog and Nexus registries
- Multiple artifact types including Docker, Maven, NPM, Helm, Python, and more
- Concurrent operations for faster migration
- Dry-run mode to preview what will be migrated
- Graceful shutdown with interrupt signal handling
Supported Source Registries
- JFrog Artifactory
- Nexus Repository Manager
Supported Artifact Types
Docker
Maven
NPM
Helm
Python
Go
NuGet
Generic
Conda
HELM_LEGACY, RPM, COMPOSER, DART
Configuration File
Create a YAML configuration file defining your source and destination registries:config.yaml
Configuration Options
Configuration version (use
1.0.0)Number of concurrent operations for faster migration
Allow overwriting existing artifacts in destination
Run in dry-run mode (no uploads, generates reports)
Source registry URL
Registry type:
JFROG or NEXUSUsername and password/token for authentication
Same structure as source, with
type: HARList of artifact mappings from source to destination
Environment Variables
You can use environment variables in your configuration:Migration Workflow
Create Configuration File
Create a
config.yaml file with your source and destination registry details.Run Dry-Run (Optional)
Test your configuration with a dry-run to see what will be migrated:This generates two files in the
dry-run-output/ directory:file_list_YYYYMMDD_HHMMSS.json- List of all files to be migrateddirectory_structure_YYYYMMDD_HHMMSS.json- Directory structure report
Execute Migration
Run the migration:The tool will:
- Load and validate your configuration
- Create API clients for source and destination
- Process each mapping concurrently
- Display progress and transfer statistics
Monitor Progress
The migration displays real-time progress:Press
Ctrl+C to gracefully shutdown if needed.Command Reference
Basic Usage
With Options
Command Options
Path to configuration file (default:
config.yaml)Base URL for the API (overrides config)
Number of concurrent operations (overrides config)
Allow overwriting artifacts (overrides config)
Run migration in dry-run mode (no uploads, generates reports)
Migration Strategies
JFrog Artifactory Migration
When migrating from JFrog:The migration tool uses JFrog’s REST API to:
- Discover packages via catalog endpoints
- Download artifacts and metadata
- Extract Maven, NPM, and Python package information
- Handle Helm charts and Docker images via OCI protocol
- Docker/Helm (OCI): Migrated using container registry protocols
- Maven: Extracts from
maven-metadata.xmland POM files - NPM: Reads from
package.jsonembedded in tarballs - Python: Parses
.pypi/simple.htmlfor package discovery - Helm Legacy: Uses
index.yamlfor chart enumeration
Nexus Repository Migration
When migrating from Nexus:The migration tool uses Nexus V3 API to:
- Search components via
/service/rest/v1/search - Download assets with proper authentication
- Discover Docker ports automatically
- Handle Maven, NPM, Python, and other formats
- Docker: Automatically discovers Docker connector ports
- Maven: Groups by
groupId/artifactId/version - Hosted repositories only: Proxy repos are not migrated
Advanced Scenarios
Multiple Artifact Types
Migrate multiple artifact types in one configuration:High-Concurrency Migration
For large migrations, increase concurrency:Selective Migration with Patterns
Filter which artifacts to migrate using include and exclude patterns:Custom Package Hostname
For Docker/OCI registries with custom hostnames:Troubleshooting
Authentication Errors
Invalid credentials
Invalid credentials
Error:
failed to validate credentialsSolution:- Verify username and password/token in config
- For JFrog, use API key or identity token
- For Nexus, ensure user has appropriate permissions
- Test credentials manually with
curl
Token expiration
Token expiration
Error:
401 UnauthorizedSolution:- Regenerate API tokens
- Use service accounts with non-expiring tokens
- Set tokens as environment variables for easy rotation
Migration Failures
Network timeouts
Network timeouts
Error:
context deadline exceededSolution:- Reduce concurrency value
- Check network connectivity
- Use
--pkg-urlto specify alternative endpoint - Verify firewall rules allow outbound connections
Registry not found
Registry not found
Error:
get registry: registry not foundSolution:- Verify registry names in source system
- Check registry identifiers are correct
- Ensure destination registries exist in Harness
- Use
hc registry listto view available registries
Artifact already exists
Artifact already exists
Error:
artifact already existsSolution:- Use
--overwriteflag to replace existing artifacts - Or add
overwrite: trueto config file - Consider using different destination registry
Performance Issues
Slow migration
Slow migration
Symptoms: Very slow transfer speedsSolutions:
- Increase
concurrencyvalue (try 5, 10, or 20) - Check source registry performance
- Verify network bandwidth
- Run migration from server with better connectivity
High memory usage
High memory usage
Symptoms: Process consuming too much RAMSolutions:
- Reduce concurrency value
- Process registries one at a time
- Split large migrations into smaller batches
Best Practices
Test with Dry-Run First
Test with Dry-Run First
Always run with
--dry-run flag first to:- Validate configuration
- Preview what will be migrated
- Estimate migration size and duration
- Identify potential issues early
Use Environment Variables for Secrets
Use Environment Variables for Secrets
Store credentials in environment variables:
Start with Low Concurrency
Start with Low Concurrency
Begin with
concurrency: 1 or concurrency: 5, then increase based on:- Source registry capacity
- Network bandwidth
- Migration performance
Monitor Source Registry
Monitor Source Registry
During migration:
- Watch source registry load
- Monitor network traffic
- Check error logs
- Be prepared to pause if issues occur
Plan for Large Migrations
Plan for Large Migrations
For migrations with thousands of artifacts:
- Split into multiple configuration files
- Migrate during off-peak hours
- Allow ample time for completion
- Have rollback plan ready
Examples
Migrate Docker Images from JFrog
Migrate Maven Artifacts from Nexus
Multi-Type Migration
Next Steps
Artifact Management
Learn how to manage artifacts after migration
Registry Commands
View all registry management commands