2021-11-12 08:12:03 +00:00
|
|
|
# Backup Architecture details
|
|
|
|
|
|
|
|
![](backup.svg)
|
|
|
|
|
|
|
|
* we use restic to produce small & encrypted backups
|
|
|
|
* backup is scheduled at `schedule: "10 23 * * *"`
|
2022-03-19 14:26:36 +00:00
|
|
|
* 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.
|
2021-11-12 08:12:03 +00:00
|
|
|
* postgres db is backed up as pgdump
|
|
|
|
|
|
|
|
## Manual init the restic repository for the first time
|
|
|
|
|
2022-03-19 14:26:36 +00:00
|
|
|
1. Scale backup-restore deployment up:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment backup-restore --replicas=1`
|
2021-11-12 08:12:03 +00:00
|
|
|
1. exec into pod and execute restore pod
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud exec -it backup-restore -- /usr/local/bin/init.sh`
|
2022-03-19 14:26:36 +00:00
|
|
|
1. Scale backup-restore deployment down:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment backup-restore --replicas=0`
|
2022-03-19 14:26:36 +00:00
|
|
|
|
2021-11-12 08:12:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Manual backup the restic repository for the first time
|
|
|
|
|
2022-03-19 14:26:36 +00:00
|
|
|
1. Scale Cloud deployment down:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment cloud-deployment --replicas=0`
|
2022-03-19 16:15:55 +00:00
|
|
|
1. Scale backup-restore deployment up:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment backup-restore --replicas=1`
|
2021-11-12 08:12:03 +00:00
|
|
|
1. exec into pod and execute restore pod
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud exec -it backup-restore -- /usr/local/bin/backup.sh`
|
2022-03-19 16:15:55 +00:00
|
|
|
1. Scale backup-restore deployment down:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment backup-restore --replicas=0`
|
2022-03-19 14:26:36 +00:00
|
|
|
1. Scale Cloud deployment up:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment cloud-deployment --replicas=1`
|
2021-11-12 08:12:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Manual restore
|
|
|
|
|
2022-03-19 14:26:36 +00:00
|
|
|
1. Scale Cloud deployment down:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment cloud-deployment --replicas=0`
|
2023-03-10 08:35:59 +00:00
|
|
|
2. Scale backup-restore deployment up:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment backup-restore --replicas=1`
|
2023-03-10 08:35:59 +00:00
|
|
|
3. exec into pod and execute restore pod
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud exec -it backup-restore -- /usr/local/bin/restore.sh`
|
2023-03-10 08:35:59 +00:00
|
|
|
4. Scale backup-restore deployment down:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment backup-restore --replicas=0`
|
2023-03-10 08:35:59 +00:00
|
|
|
5. Scale Cloud deployment up:
|
2024-03-22 14:29:01 +00:00
|
|
|
`kubectl -n nextcloud scale deployment cloud-deployment --replicas=1`
|