upgrade backup procedure

This commit is contained in:
2023-11-30 11:53:22 +01:00
parent aca11b13e1
commit f1811dedf1
3 changed files with 7 additions and 35 deletions

View File

@@ -14,15 +14,10 @@ spec:
image: postgres:15
command: ["/bin/sh"]
args:
- "-c"
- >-
echo "$postgress_password" > /root/.pgpass
&&
chmod 600 /root/.pgpass
&&
pg_dumpall -U postgres -h postgres-postgresql.postgres > /backup/backup-$(date +"%m-%d-%Y-%H-%M").sql
- '-c'
- 'pg_dumpall -U postgres -h postgres-postgresql.postgres > /backup/backup-$(date +"%m-%d-%Y-%H-%M").sql'
env:
- name: postgress_password
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: postgres-password