Restore the data extract

You can restore a transformed data extract into a target MSR environment using commands that are presented herein on the target MSR system.

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

  2. Exec into the MMT Pod.

  3. Execute the restore command:

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

    Example output:

    Successfully restored metadata from:
    "/home/<user-directory>/tmp/migrate/msr-backup-<MSR-version>-mmt.tar"
    
  4. Register MSR with eNZi:

    kubectl exec -it deployment/<msr-instance-name>-api -- \
    msr auth register \
    --username <username> \
    --password <password> \
    https://<msr-instance-name>-enzi:4443/enzi
    
  5. Restart the affected MSR Pods:

    kubectl -n <msr-namespace> rollout restart deployment \
    <msr-instance-name>-enzi-api \
    <msr-instance-name>-api \
    <msr-instance-name>-registry \
    <msr-instance-name>-garant \
    <msr-instance-name>-jobrunner-<postfix>
    
  1. On the target system, run the following command from inside a 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 \
    registry.mirantis.com/msr/mmt:$MMT_VERSION \
    restore msr
    --storage-mode <inplace|copy> \
    --swarm \
    /migration
    

    Example output:

    Successfully restored metadata from:
    "/home/<user-directory>/tmp/migrate/msr-backup-<MSR-version>-mmt.tar"
    
  2. Register MSR with eNZi:

    docker exec -it $(docker ps -q --filter "name=msr-api") sh -c 'msr auth register https://$TASK_SLOT.msr-enzi-api:4443/enzi'
    
  3. Restart the affected services:

    docker service update --force msr_msr-enzi-api && \
    docker service update --force msr_msr-api-server && \
    docker service update --force msr_msr-registry && \
    docker service update --force msr_msr-garant && \
    docker service update --force msr_msr-jobrunner
    
Command line parameters

Parameter

Target system orchestrator

Description

backup-file

Kubernetes, Swarm

Optional. Sets the path to the data extract from which to restore your MSR deployment.

Default: Data extract in the current directory.

blob-dir

Kubernetes, Swarm

Optional. Sets the path to the blob storage directory from which to restore your MSR image blobs. Use only if extraction was performed in copy mode.

Default: Blob storage in the current directory.

disable-analytics

Kubernetes, Swarm

Optional. Disables MMT metrics collection for the restore command. You must include the flag each time you run the command.

enzipassword

Swarm

Optional. Sets the eNZi admin password.

fullname

Kubernetes

Sets the name of the MSR instance to which MMT will restore the data extract.

Note

Use only when the target system runs on a Kubernetes cluster.

Default: msr

manifests-dir

Kubernetes, Swarm

Optional. Sets the path to the manifests directory from which to load the configuration.

Default: Manifests in the current directory.

msr-chart

Kubernetes

Optional. Sets the location of the MSR 3.x chart.

Valid values: path to chart directory or packaged chart, URL for MSR repository, or fully qualified chart URL.

Default: https://registry.mirantis.com/charts/msr/msr.

namespace

Kubernetes

Optional. Sets the namespace scope for the given command.

Default: default.

parallel-io-count

Kubernetes, Swarm

Optional. Sets the number of parallel IO copies when performing blob storage copy tasks.

Default: 4

storage-mode

Kubernetes, Swarm

Sets the registry migration storage mode.

Valid values: inplace, copy

swarm

Swarm

Optional. Specifies that the source system runs on Docker Swarm.

Default: false