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:
20
ops/pgbackup/zareian-pg216-tunnel.service
Normal file
20
ops/pgbackup/zareian-pg216-tunnel.service
Normal 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
|
||||
Reference in New Issue
Block a user