From 04278d55f1b9b2dda065339cc6d72c6e64295ee6 Mon Sep 17 00:00:00 2001 From: K1Hyve <53298451+K1Hyve@users.noreply.github.com> Date: Thu, 8 Apr 2021 17:50:19 +0200 Subject: [PATCH] Update BACKUP.md --- BACKUP.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/BACKUP.md b/BACKUP.md index a5b0c7cd..44426db5 100644 --- a/BACKUP.md +++ b/BACKUP.md @@ -41,5 +41,34 @@ In case the cluster goes down or there is a need to restore data from back up fo - Remove the `schedule` section [from configuration](https://github.com/RADAR-base/RADAR-Kubernetes/blob/dev/charts/velero/values.yaml#L92) to disable new backup creation - Install the Velero on new cluster with this command: `helmfile -f helmfile.d/99-velero.yaml sync` - Follow the steps from 3 to 5 in [Disaster recovery page](https://velero.io/docs/v1.4/disaster-case/) of Velero documentation +- Use the following commands to restore Object storage + If everything works correctly *manifest* and *volume data* should be restored to the new cluster, if it fails restoration should be done manually. + +Radar-base output and intermediate data needs to be manually restored. + +## Manual restore + +### Restore manifests +``` +mc ls backup/radar-base-backups/backups/ +``` + +``` +mkdir backup +cd backup +mc cp backup/radar-base-backups/backups/velero-backup-XXXXXXXXXXXXXX/velero-backup-XXXXXXXXXXXXXX.tar.gz . +tar xzf velero-backup-XXXXXXXXXXXXXX.tar.gz +find . -name '*.json' -exec kubectl -f {} \; +``` + +### Restore volume data + +## Output data restore +First install [Minio client CLI](https://docs.minio.io/docs/minio-client-complete-guide) accordingly to the linked guide and then add backup and production object storages with `mc config host add` command and then run these two commands to copy the data from backup server to new object storage: + +``` +mc mirror --overwrite --md5 backup/radar-intermediate-storage production/radar-intermediate-storage +mc mirror --overwrite --md5 backup/radar-output-storage production/radar-output-storage +````