Live backup of 216 on 247 (zareian-pg216-* units, Postgres 16 tools in our dir, SCRAM hash only on 216), backup scripts take PGB_ROOT/PGB_BIN/PGB_PORT with 249 defaults, anti-bot layers documented

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 19:22:56 +03:30
parent bd329f83ae
commit dd98f16d12
11 changed files with 96 additions and 13 deletions

View File

@@ -0,0 +1,20 @@
# روی سرورِ بکاپ (۲۴۷). تونلِ SSH از 127.0.0.1:15441ِ این‌جا به Postgresِ سرورِ اختصاصی (۲۱۶، 127.0.0.1:5440).
# طرفِ ۲۱۶ کاربرِ سیستمیِ pgbackup است: فقط همین کلید، فقط از 192.168.200.167، بی‌شِل، و در authorized_keys
# permitopen="127.0.0.1:5440" (هیچ پورتِ دیگری). رمزِ zareian_replicator فقط در ~/.pgpassِ ۲۴۷ است؛ ۲۱۶ فقط هشِ SCRAM آن را دارد.
# (forwardingِ سوکت ممکن نیست: AllowTcpForwarding no در sshd آن را هم می‌بندد.)
[Unit]
Description=Zareian MathApp: SSH tunnel to the app Postgres on 216
After=network-online.target
Wants=network-online.target
[Service]
User=administrator
ExecStart=/usr/bin/ssh -N -i /home/administrator/.ssh/zareian_pgbackup_216 \
-o BatchMode=yes -o ExitOnForwardFailure=yes \
-o ServerAliveInterval=15 -o ServerAliveCountMax=3 \
-L 127.0.0.1:15441:127.0.0.1:5440 pgbackup@192.168.200.163
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target