fix backups
This commit is contained in:
@@ -3,3 +3,4 @@ kind: Kustomization
|
||||
resources:
|
||||
- rclone-config.sealedsecret.yaml
|
||||
- restic-password.sealedsecret.yaml
|
||||
- pvc.yaml
|
25
infrastructure/backup/common/pvc.yaml
Normal file
25
infrastructure/backup/common/pvc.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: backup-nfs-access
|
||||
spec:
|
||||
capacity:
|
||||
storage: "1Mi"
|
||||
accessModes:
|
||||
- ReadOnlyOnce
|
||||
nfs:
|
||||
path: /kluster/
|
||||
server: 192.168.1.157
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: backup-nfs-access
|
||||
spec:
|
||||
storageClassName: ""
|
||||
accessModes:
|
||||
- ReadOnlyOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: "1Mi"
|
||||
volumeName: backup-nfs-access
|
@@ -20,9 +20,9 @@ spec:
|
||||
&&
|
||||
chmod 600 /root/.pgpass
|
||||
&&
|
||||
pg_dumpall -U postgres -h postgrespostgres-postgresql.postgres > /backup/backup-$(date +"%m-%d-%Y-%H-%M").sql
|
||||
pg_dumpall -U postgres -h postgres-postgresql.postgres > /backup/backup-$(date +"%m-%d-%Y-%H-%M").sql
|
||||
env:
|
||||
- name: PGpostgress_passwordPASS
|
||||
- name: postgress_password
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-password
|
||||
|
Reference in New Issue
Block a user