Merge branch 'main' of ssh://repo.prod.meissa.de:2222/meissa/c4k-forgejo
This commit is contained in:
commit
c815f62b01
2 changed files with 8 additions and 9 deletions
|
@ -12,9 +12,9 @@ c4k-forgejo provides a k8s deployment file for forgejo containing:
|
||||||
* ingress having a letsencrypt managed certificate
|
* ingress having a letsencrypt managed certificate
|
||||||
* postgres database
|
* postgres database
|
||||||
* encrypted backup on S3 & restore
|
* encrypted backup on S3 & restore
|
||||||
* monitoring on graphana-cloud
|
* monitoring on grafana-cloud
|
||||||
|
|
||||||
c4k-forgejo is an example how to create efficient k8s one shot deployments with https://repo.prod.meissa.de/meissa/c4k-common.
|
c4k-forgejo is an example how to create efficient k8s one-shot deployments with https://repo.prod.meissa.de/meissa/c4k-common.
|
||||||
|
|
||||||
## Try out
|
## Try out
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# Backup Architecture details
|
# Backup Architecture details
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* we use restic to produce small & encrypted backups
|
* we use restic to produce small & encrypted backups
|
||||||
* backup is scheduled at `schedule: "10 23 * * *"`
|
* backup is scheduled at `schedule: "10 23 * * *"`
|
||||||
* Forgejo stores files in `/data/gitea` and `/data/git/repositories`, these files are backed up.
|
* Forgejo stores files in `/data/gitea` and `/data/git/repositories`, these files are backed up.
|
||||||
|
@ -22,16 +20,16 @@
|
||||||
|
|
||||||
## Manual restore
|
## Manual restore
|
||||||
|
|
||||||
1. Scale down forgejo deployment:
|
1. Scale down forgejo deployment:
|
||||||
`kubectl -n forgejo scale deployment forgejo --replicas=0`
|
`kubectl -n forgejo scale deployment forgejo --replicas=0`
|
||||||
2. apply backup-and-restore pod:
|
2. apply backup-and-restore pod:
|
||||||
`kubectl -n forgejo scale deployment backup-restore --replicas=1`
|
`kubectl -n forgejo scale deployment backup-restore --replicas=1`
|
||||||
3. exec into pod and execute restore pod (press tab to get your exact pod name)
|
3. exec into pod and execute restore pod (press tab to get your exact pod name):
|
||||||
`kubectl -n forgejo exec -it backup-restore-... -- /usr/local/bin/restore.bb`
|
`kubectl -n forgejo exec -it backup-restore-... -- /usr/local/bin/restore.bb`
|
||||||
4. Start forgejo again:
|
4. remove backup-and-restore pod:
|
||||||
`kubectl -n forgejo scale deployment forgejo --replicas=1`
|
|
||||||
5. remove backup-and-restore pod:
|
|
||||||
`kubectl -n forgejo scale deployment backup-restore --replicas=0`
|
`kubectl -n forgejo scale deployment backup-restore --replicas=0`
|
||||||
|
5. start forgejo again:
|
||||||
|
`kubectl -n forgejo scale deployment forgejo --replicas=1`
|
||||||
|
|
||||||
## Change Password
|
## Change Password
|
||||||
|
|
||||||
|
@ -41,6 +39,7 @@
|
||||||
metadata:
|
metadata:
|
||||||
name: backup-restore
|
name: backup-restore
|
||||||
spec:
|
spec:
|
||||||
|
...
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: backup-app
|
- name: backup-app
|
||||||
|
|
Loading…
Reference in a new issue