From fd5197d7dff4bdbc2dd820eef05544bf3377d61a Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 19 Oct 2023 10:47:44 +0200 Subject: [PATCH] Add BackupAndRestore info --- doc/BackupAndRestore.md | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 doc/BackupAndRestore.md diff --git a/doc/BackupAndRestore.md b/doc/BackupAndRestore.md new file mode 100644 index 0000000..ed14a41 --- /dev/null +++ b/doc/BackupAndRestore.md @@ -0,0 +1,46 @@ +# Backup Architecture details + +![](backup.svg) + +* we use restic to produce small & encrypted backups +* backup is scheduled at `schedule: "10 23 * * *"` +* Cloud stores files on `/var/jira`, these files are backuped. If you create a jira xml backup located in /var/jira this file will also be backed up. +* postgres db is backed up as pgdump + +## Manual init the restic repository for the first time + +1. Scale backup-restore deployment up: + `kubectl scale deployment backup-restore --replicas=1` +1. exec into pod and execute restore pod + `kubectl exec -it backup-restore -- /usr/local/bin/init.sh` +1. Scale backup-restore deployment down: + `kubectl scale deployment backup-restore --replicas=0` + + + +## Manual backup the restic repository for the first time + +1. Scale Cloud deployment down: + `kubectl scale deployment cloud-deployment --replicas=0` +1. Scale backup-restore deployment up: + `kubectl scale deployment backup-restore --replicas=1` +1. exec into pod and execute restore pod + `kubectl exec -it backup-restore -- /usr/local/bin/backup.sh` +1. Scale backup-restore deployment down: + `kubectl scale deployment backup-restore --replicas=0` +1. Scale Cloud deployment up: + `kubectl scale deployment cloud-deployment --replicas=1` + + +## Manual restore + +1. Scale Cloud deployment down: + `kubectl scale deployment cloud-deployment --replicas=0` +2. Scale backup-restore deployment up: + `kubectl scale deployment backup-restore --replicas=1` +3. exec into pod and execute restore pod + `kubectl exec -it backup-restore -- /usr/local/bin/restore.sh` +4. Scale backup-restore deployment down: + `kubectl scale deployment backup-restore --replicas=0` +5. Scale Cloud deployment up: + `kubectl scale deployment cloud-deployment --replicas=1`