- 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>
20 lines
1.0 KiB
Desktop File
20 lines
1.0 KiB
Desktop File
# روی سرورِ بکاپ (۲۴۷). هر تغییرِ دیتابیسِ ۲۴۹ را لحظهای در wal/ مینویسد (pg_receivewal، ابزارِ خودِ Postgres).
|
|
# --synchronous: هر تکه همان لحظه روی دیسکِ اینجا fsync میشود. اپ روی ۲۴۹ منتظرِ اینجا نمیماند
|
|
# (synchronous_standby_names خالی است)، پس قطعیِ ۲۴۷ هیچ پرداختی را کند یا متوقف نمیکند.
|
|
# اسلاتِ zareian_247 روی ۲۴۹ نگه میدارد که در قطعی چیزی جا نیفتد؛ سقفش max_slot_wal_keep_size=1GB است.
|
|
[Unit]
|
|
Description=Zareian MathApp: live WAL stream from 249
|
|
After=zareian-pg-tunnel.service
|
|
BindsTo=zareian-pg-tunnel.service
|
|
|
|
[Service]
|
|
User=administrator
|
|
ExecStart=/usr/lib/postgresql/14/bin/pg_receivewal -h 127.0.0.1 -p 15440 -U zareian_replicator \
|
|
--no-password --slot=zareian_247 --synchronous --no-loop \
|
|
-D /home/administrator/zareian-pgbackup/wal
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|