Warning: In correlation with the end of life (EOL) date for MSR 3.1.x, Mirantis stopped maintaining this documentation version as of 2025-09-27. The latest MSR product documentation is available here.

Restore from an MSR backup

In the event that a majority of the RethinkDB table replicas in use by MSR are unhealthy, and an emergency repair is unsuccessful, you must restore the cluster from a backup.

Restore MSR from a backup for Kubernetes

To restore MSR from a backup:

  1. Set up an MSR instance to serve as the restore target.

  2. Verify that the MSR version in use by the cluster matches the one used to create the backup.

  3. Extract your backup:

    • If MSR is configured to store images on the local file system, run the following command:

      sudo tar -xf image-backup.tar -C /var/lib/docker/volumes
      
    • If MSR uses a different storage back end, follow the best practices recommended for that system.

  4. Use the msr restore command to restore MSR metadata from a previously created backup. The command is present in any API Pod and can be run using the kubectl exec command.

    The following is an example of restoring onto an MSR installation named mymsr. The backup contents are streamed from standard input, which receives its data from the local file backup.tar.

    kubectl exec -i deployment.apps/<msr-installation-name> -- msr restore - < backup.tar
    
  5. Register MSR with eNZi (auth service):

    1. Run the msr auth register admin command:

      kubectl exec -i deployment.apps/mymsr-api -- msr auth register --username
      admin -p password https://mymsr-enzi:4443/enzi
      
    2. Restart MSR Pods:

      kubectl rollout restart deployment mymsr-api mymsr-enzi-api mymsr-garant mymsr-registry
      
  6. If you scan images in MSR, you must update the vulnerability database in the MSR UI. Refer to Enable MSR security scanning for more information.

After you successfully restore MSR, you can join new replicas as you would following a fresh installation.

Restore MSR from a backup for Swarm

To restore MSR from a backup:

  1. Set up an MSR instance to serve as the restore target.

  2. Verify that the MSR version in use by the cluster matches the one used to create the backup.

  3. Extract your backup:

    • If MSR is configured to store images on the local file system, run the following command:

      sudo tar -xvf ~/msr-image-backup.tar -C /var/lib/docker/volumes/msr_msr-storage
      
    • If MSR uses a different storage back end, follow the best practices recommended for that system.

  4. Use the msr restore command to restore MSR metadata from a previously created backup. The command is present in any API container and can be run using the docker exec command.

    The following is an example of restoring onto an MSR installation named msr. The backup contents are streamed from standard input, which receives its data from the local file backup.tar.

    docker container exec -i $(docker ps -q --filter "name=msr-api") msr restore - < backup.tar
    
  5. Run the msr auth register admin command:

    docker container exec -i $(docker ps -q --filter "name=msr-api") msr auth register --username <MSR admin user> -p <MSR admin password> https://<node's ID>.msr-enzi-api:4443/enzi
    
  6. If you scan images in MSR, you must update the vulnerability database in the MSR UI. Refer to Enable MSR security scanning for more information.

After you successfully restore MSR, you can join new replicas as you would following a fresh installation.