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.
Deploy MMT as a Pod onto your MSR target cluster.
Exec into the MMT Pod.
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"
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
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>
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"
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'
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
Parameter |
Target system orchestrator |
Description |
---|---|---|
|
Kubernetes, Swarm |
Optional. Sets the path to the data extract from which to restore your MSR deployment. Default: Data extract in the current directory. |
|
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. |
|
Kubernetes, Swarm |
Optional. Disables MMT metrics collection for the restore command. You must include the flag each time you run the command. |
|
Swarm |
Optional. Sets the eNZi admin password. |
|
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: |
|
Kubernetes, Swarm |
Optional. Sets the path to the manifests directory from which to load the configuration. Default: Manifests in the current directory. |
|
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: |
|
Kubernetes |
Optional. Sets the namespace scope for the given command. Default: |
|
Kubernetes, Swarm |
Optional. Sets the number of parallel IO copies when performing blob storage copy tasks. Default: |
|
Kubernetes, Swarm |
Sets the registry migration storage mode. Valid values: |
|
Swarm |
Optional. Specifies that the source system runs on Docker Swarm. Default: |