Skip to content

Commit 6fb75cd

Browse files
committed
#707 backup volume mount removed
1 parent 7f18f4d commit 6fb75cd

1 file changed

Lines changed: 37 additions & 2 deletions

File tree

docs/applications/databases.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,49 @@ Per default, database backups are disabled. However, you can overwrite backups b
111111

112112
```yaml
113113
backup:
114-
active: true
114+
active: true
115115
```
116116

117+
See all the default values [here](../../deployment-configuration/helm/values.yaml).
117118
You can find additional configuration fields for backups to overwrite in the generated `deployment/helm/values.yaml` once you deploy your applications.
118119

119120
Backups are defined for `mongo` and `postgres` database in form of a [K8s CronJob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) that creates a dump of the database and stores it in a different persistent volume on the same cluster.
120121

121-
This is done periodically according to a configurable schedule, per default once a day.
122+
This is done periodically according to a configurable schedule, per default every 5 minutes.
123+
124+
A smart retention strategy is used for backups, by default:
125+
- all current days backups
126+
- one per day, last 7 days
127+
- one per week, last 4 weeks
128+
- one per month, last 6 months
129+
130+
Implementation of backups and retention is based on https://github.com/prodrigestivill/docker-postgres-backup-local.
131+
132+
#### How to monitor and restore backups
133+
134+
Backups are stored in a Kubernetes volume named `db-backups`.
135+
136+
Can mount the volume to your database pod by adding the following to your db deployment:
137+
138+
```yaml
139+
...
140+
spec:
141+
template:
142+
spec:
143+
containers:
144+
- ...
145+
volumeMounts:
146+
- name: "db-backups"
147+
mountPath: /backups
148+
readOnly: true
149+
...
150+
volumes:
151+
...
152+
- name: "db-backups"
153+
persistentVolumeClaim:
154+
claimName: "db-backups"
155+
```
156+
122157

123158

124159
### MongoDB

0 commit comments

Comments
 (0)