mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
🩹 fix pg backups
This commit is contained in:
@@ -1,30 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Possible actions: error, pre-backup, post-backup
|
|
||||||
ACTION="$1"
|
|
||||||
|
|
||||||
if [ "$WEBHOOK_URL" != "**None**" ]; then
|
|
||||||
case "$ACTION" in
|
|
||||||
"error")
|
|
||||||
echo "Execute error webhook call to $WEBHOOK_URL"
|
|
||||||
curl --url "$WEBHOOK_URL" \
|
|
||||||
--header 'Content-Type: application/json' \
|
|
||||||
--max-time 10 \
|
|
||||||
--retry 5 \
|
|
||||||
$WEBHOOK_EXTRA_ARGS
|
|
||||||
;;
|
|
||||||
# "pre-backup")
|
|
||||||
# echo "Nothing to do"
|
|
||||||
# ;;
|
|
||||||
"post-backup")
|
|
||||||
echo "Execute post-backup webhook call to $WEBHOOK_URL"
|
|
||||||
curl --url "$WEBHOOK_URL" \
|
|
||||||
--header 'Content-Type: application/json' \
|
|
||||||
--max-time 10 \
|
|
||||||
--retry 5 \
|
|
||||||
$WEBHOOK_EXTRA_ARGS
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
@@ -46,15 +46,8 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: backups
|
- name: backups
|
||||||
mountPath: /backups
|
mountPath: /backups
|
||||||
- name: files
|
|
||||||
subPath: 00-webhook
|
|
||||||
mountPath: /hooks/00-webhook
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: backups
|
- name: backups
|
||||||
nfs:
|
nfs:
|
||||||
server: "${LOCAL_LAN_TRUENAS}"
|
server: "${LOCAL_LAN_TRUENAS}"
|
||||||
path: /mnt/storage/backups/postgresql
|
path: /mnt/storage/backups/postgresql
|
||||||
- name: files
|
|
||||||
configMap:
|
|
||||||
name: postgres-external-backup
|
|
||||||
defaultMode: 0555
|
|
||||||
|
Reference in New Issue
Block a user