Migrate Projects¶
During migration, source organizations and repositories are recreated as projects. You can configure replication behavior both during and after migration using the options provided by the migration tool.
To migrate repositories as projects:
Run the migration tool with the
--projects
flag to prepare the MSR 2.9 or 3.1 repositories for migration:docker run \ -v ./sql:/app/data/sql \ -v ./csv:/app/data/csv \ -v ./config:/app/config \ --network host \ registry.mirantis.com/msrh/migrate:latest poetry run migration --projects
The migration tool first exports data from MSR and Enzi. It then processes this data to import all repositories into MSR 4. Exported data is stored in the
csv
directory, while data prepared for import resides in thesql
directory.Optional. Verify if data has been exported:
Verify the
./csv
directory for exported data:ls -l csv
Within the
csv
directory, all exported files are prefixed with eithermsr_
orenzi_
, indicating their source. Files prefixed withharbor_
represent data migrated to MSR 4, exported for verification purposes.Verify the
./sql
directory for SQL files that contain data to be imported into MSR 4:ls -l sql
The migration recreates source organizations and repositories as projects.
Open the MSR web UI and verify if the projects are visible.
Export data and migrate projects¶
To trigger the replication process:
Configure the replication schedule in the
config/config.env
file:REUSE_ALREADY_FETCHED_DATA=True REPLICATION_TRIGGER_CRON="0 0 1 * * *"
See the Configuration Reference for complete configuration reference.
Start an interactive partial migration:
docker run \ -v ./data/sql:/app/data/sql \ -v ./data/csv:/app/data/csv \ -v ./config:/app/config \ --network host \ registry.mirantis.com/msrh/migrate:latest poetry run migration \ --trigger-replication-rule
Note
The migration process may take a significant amount of time, depending on factors such as storage and network speed, and the volume of data in your project.
To verify that all replication tasks have completed, run the following command with your environment-specific values:
docker run registry.mirantis.com/msrh/migrate:latest utils/migration_replication_status.sh \ --url=msr4.[MY-DOMAIN].com \ --user=admin \ --pwd=[ADMIN-PASSWORD]
Example output:
Fetching policies with prefix 'migration-rule-'... === Replication Summary === Total executions: 191 Succeeded : 188 (98.4%) In Progress : 0 ( 0.0%) Failed : 3 ( 1.6%) Stopped : 0 ( 0.0%) Others : 0 ( 0.0%)
Note
To view command options and usage instructions, run:
docker run registry.mirantis.com/msrh/migrate:latest utils/migration_replication_status.sh --help