Browse Source

Added pgdump backup hook to postgres pod

master
Fábio Kaiser Rauber 3 years ago
parent
commit
d29ed9f5fe
  1. 11
      charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml
  2. 11
      charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml
  3. 11
      charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml

11
charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml

@ -40,5 +40,16 @@ spec:
- --unfreeze
- /var/interlegis/sapl/media
timeout: 10s
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command: "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump"
timeout: 360s
useOwnerReferencesInBackup: false
{{- end }}

11
charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml

@ -40,5 +40,16 @@ spec:
- --unfreeze
- /var/interlegis/sapl/media
timeout: 10s
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command: "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump"
timeout: 360s
useOwnerReferencesInBackup: false
{{- end }}

11
charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml

@ -40,5 +40,16 @@ spec:
- --unfreeze
- /var/interlegis/sapl/media
timeout: 10s
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command: "/opt/bitnami/postgresql/bin/pg_dump -U postgres sapl > /bitnami/postgresql/sapl.dump"
timeout: 360s
useOwnerReferencesInBackup: false
{{- end }}
Loading…
Cancel
Save