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.
To restore MSR from a backup:
Set up an MSR instance to serve as the restore target.
Verify that the MSR version in use by the cluster matches the one used to create the backup.
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.
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 filebackup.tar
.kubectl exec -i deployment.apps/<msr-installation-name> -- msr restore - < backup.tar
Register MSR with eNZi (auth service):
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
Restart MSR Pods:
kubectl rollout restart deployment mymsr-api mymsr-enzi-api mymsr-garant mymsr-registry
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.