From eecabae33362f89d7ed0834a7bc458e32f2c27f4 Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Sun, 19 Oct 2025 18:08:00 -0700 Subject: [PATCH] working on snapshots --- backup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index 969e799..dad524b 100644 --- a/backup.sh +++ b/backup.sh @@ -4,7 +4,7 @@ # Author: Calahil Studios # === CONFIGURATION === -BACKUP_DIR="/backups/postgres" +BACKUP_DIR="/backups/postgres_dumps" INTERVAL_HOURS="${INTERVAL_HOURS:-24}" # Default to 24 hours if not set RETENTION_DAYS="${RETENTION_DAYS:-7}" # Keep 7 days of backups @@ -14,7 +14,6 @@ KNOWN_IMAGES=$( postgres:17.0-alpine postgres:17 postgres -lscr.io/linuxserver/postgres postgres:14.0-alpine ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0 EOF @@ -65,6 +64,8 @@ while true; do done fi + btrfs subvolume snapshot -r /mnt/backups/prodesk /mnt/backups/prodesk-$(date +%F) + echo "[INFO] Backup cycle complete." echo "[INFO] Sleeping for ${INTERVAL_HOURS}h..." sleep "${INTERVAL_HOURS}h"