[ARCH] Daily Prism/Seerr backups with restore evidence
lint / hygiene (push) Failing after 19s
lint / hygiene (pull_request) Failing after 20s
standard / check (push) Successful in 13s
standard / check (pull_request) Successful in 11s

This commit is contained in:
architect committed 2026-11-26 23:34:50 +03:00
1 parent c96a1853e3
commit 0225cfb9d4
1 file changed
+11
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
set -e
STAMP=$(date +%Y%m%d-%H%M)
mkdir -p /mnt/archive/backups/prism /mnt/archive/backups/seerr
export PGPASSWORD=$(cat /root/.pg-superuser-pass)
pg_dump -h 192.168.1.151 -U postgres -d rag -n prism -Fc -f "/mnt/archive/backups/prism/prism-$STAMP.dump"
pct exec 121 -- sh -lc "tar --warning=no-file-changed -czf /tmp/seerr-config-$STAMP.tar.gz -C /opt/seerr/config ." >/tmp/seerr_tar.log 2>&1
pct pull 121 "/tmp/seerr-config-$STAMP.tar.gz" "/mnt/archive/backups/seerr/seerr-config-$STAMP.tar.gz" >/dev/null
pct exec 121 -- rm -f "/tmp/seerr-config-$STAMP.tar.gz"
find /mnt/archive/backups/prism /mnt/archive/backups/seerr -type f -mtime +30 -delete
ls -lh "/mnt/archive/backups/prism/prism-$STAMP.dump" "/mnt/archive/backups/seerr/seerr-config-$STAMP.tar.gz"