Skip to content
MSR 2.9.x reaches End of Life (EOL) on 2027-MAR-24. Mirantis strongly recommends upgrading to the latest supported version to continue receiving updates, fixes, and support.

Extract the data#

You can extract metadata and, optionally, binary image data from an MSR source system using commands that are presented herein.

Important

To avoid data inconsistencies, the source registry must remain in read-only mode throughout the migration to the target MSR system.

Be aware that MSR 3.0.x source systems cannot be placed into read-only mode. If you are migrating from a 3.0.x source system, be careful not to write any files during the migration process.

extract msr (2.9.x source systems)#

Use the extract msr command for migrations that originate from an MSR 2.9.x system.

docker run \
--rm -it \
-v <local-migration-directory>:/migration:Z \
mirantis/mmt:<mmt-version> \
extract msr \
--source-mke-url <mke-url> \
--source-username <admin-username> \
--source-password <admin-password> \
--source-url <source-msr-url> \
--storage-mode <inplace|copy> \
--source-insecure-tls \
/migration

Note

Migrations that use the copy storage mode and a filesystem storage backend must also include the --mount option, to specify the MSR 2.9.x Docker volume that will be mounted to the MMT container at the /storage directory. As --mount is a Docker option, it must be included prior to the mirantis/mmt:<mmt-version> portion of the command.

--mount source=dtr-registry-<replica-id>,target=/storage

To obtain the MSR replica ID, run the following command from within an MSR node:

docker ps --format '{{.Names}}' -f name=dtr-rethink | cut -f 3 -d '-'
Parameter Description
source-mke-url Set the URL for the source Mirantis Kubernetes Engine (MKE) system.
source-username Set the username of the admin user. For MSR 2.9.x source systems, use the MKE admin user.
source-password Set the password of the admin user. For MSR 2.9.x source systems, use the MKE admin user.
source-url Set the URL for the source MSR system.
storage-mode Set the registry migration storage mode. Valid values: inplace, copy
source-insecure-tls Optional. Set whether to use an insecure connection. Valid values: true (skip certificate verification when communicating with the source system), false (perform certificate validation when communicating with the source system)
disable-analytics Optional. Disables MMT metrics collection for the extract command. You must include the flag each time you run the command.

Example output:

The Mirantis Migration Tool extracted your registry of MSR 2.9, using the
following parameters:
Source Registry: https://172.17.0.1
Mode: copy
Image data: 2 blobs (2.8 MB)

The data extract is rendered as a TAR file with the name dtr-metadata-mmt-backup.tar in the <local-migration-directory>. The file name is later converted to msr-backup-<MSR-version>-mmt.tar, following the transform step.

extract msr3 (3.x.x source systems) Available since MMT 2.0.0#

Use the extract msr3 command for migrations that originate from an MSR 3.x.x system.

  1. Deploy MMT as a Pod onto your MSR source cluster.

  2. Exec into the MMT Pod.

  3. Execute the extract command:

    ./mmt extract msr3 \
    --storage-mode <inplace|copy> \
    --fullname <source-MSR-instance-name>
    /migration
    

Execute the following command on a Swarm worker node on which MSR is installed:

docker run \
--rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v <local-migration-directory>:/migration:Z \
--mount source=msr_msr-storage,target=/storage \
--network msr_msr-ol \
mirantis/mmt:<mmt-version> \
extract msr3 \
--storage-mode <inplace|copy> \
--fullname <source-MSR-instance-name> \
--swarm \
/migration
Parameter Description
disable-analytics Optional. Disables MMT metrics collection for the extract command. You must include the flag each time you run the command.
fullname Optional. Sets the name of the MSR instance from which MMT will perform the data extract. Default: msr
ignore-events-table Optional. Excludes the events table from the data extract.
parallel-io-count Optional. Sets the number of parallel IO copies when performing blob storage copy tasks. Default: 4
signed-images-only Optional. Excludes unsigned images from the data extract.
storage-mode Sets the registry migration storage mode. Valid values: inplace, copy
swarm Optional. Indicates that the source system runs on a Swarm cluster.

Example output:

INFO[0000] Migration will be performed with "inplace" storage mode
INFO[0000] Backing up metadata...
{"level":"info","msg":"Writing RethinkDB backup","time":"2023-07-06T01:25:51Z"}
{"level":"info","msg":"Backing up MSR","time":"2023-07-06T01:25:51Z"}
{"level":"info","msg":"Recording time of backup","time":"2023-07-06T01:25:51Z"}
{"level":"info","msg":"Backup file checksum is: 0e2134abf81147eef953e2668682b5e6b0e9761f3cbbb3551ae30204d0477291","time":"2023-07-06T01:25:51Z"}
INFO[0002] The Mirantis Migration Tool extracted your registry of MSR 3.x, using the following parameters:
Source Registry: MSR3
Mode: metadata only
Existing MSR3 storage will be backed up.
The source registry must remain in read-only mode for the duration of the operation to avoid data inconsistencies.

The data extract is rendered as a TAR file with the name msr-backup-<MSR-version>-mmt.tar in the <local-migration-directory>.