Files
MathApp/ops/pgbackup/zareian-pg-tunnel.service
Zareian a9cccc6550 Live off-site Postgres copy on 247 replaces the nightly pg_dump; backup retention in deploy.sh
- ops/pgbackup: SSH tunnel + pg_receivewal (slot zareian_247) + daily verified pg_basebackup (keep 7)
  and a restore check, all run on 78.38.35.247 as systemd units
- /api/health reports offsiteBackup (slot active/lag/lost) and warns; OFFSITE_WAL_SLOT setting
- removed statuslog backup_db/backup_verify and their health warnings
- deploy.sh keeps 3 pre-deploy dumps, 3 local patches, drops manual backups after 30 days
- docs: operations backup section, security item 14 closed, CLAUDE.md status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:53:10 +03:30

20 lines
881 B
Desktop File

# روی سرورِ بکاپ (۲۴۷). تونلِ SSH از 127.0.0.1:15440ِ این‌جا به Postgresِ ما روی ۲۴۹ (127.0.0.1:5440).
# کلید در authorized_keysِ ۲۴۹ با restrict,port-forwarding,permitopen="127.0.0.1:5440" محدود است:
# با آن نه شِل باز می‌شود نه پورتِ دیگری. ترافیک در شبکه‌ی داخلی (192.168.200.x) می‌ماند.
[Unit]
Description=Zareian MathApp: SSH tunnel to the app Postgres on 249
After=network-online.target
Wants=network-online.target
[Service]
User=administrator
ExecStart=/usr/bin/ssh -N -i /home/administrator/.ssh/zareian_pgbackup \
-o BatchMode=yes -o ExitOnForwardFailure=yes \
-o ServerAliveInterval=15 -o ServerAliveCountMax=3 \
-L 127.0.0.1:15440:127.0.0.1:5440 administrator@192.168.200.164
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target