mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:41:09 +02:00
Replace simple pg_dumpall with pgBackRest PITR backup system. This enables recovery to any second, not just the last daily dump. Configuration: - docker/postgres/postgresql.conf: WAL archiving + performance tuning (shared_buffers=512MB, effective_cache_size=2GB for 16GB Mac Mini) - docker/postgres/pgbackrest.conf: stanza config + retention policy Docker (docker-compose.macmini.yml): - postgres: mount custom config, enable WAL archiving - postgres-backup: new pgBackRest container - Storage: /Volumes/ManaData/backups/pgbackrest - Retention: 4 full + 14 differential (~4 weeks) - Compression: Zstandard (zst) Backup Schedule: - 03:00 daily: Full backup - Every 6h: Differential (changes since last full) - Every hour: Incremental (changes since last backup) - Continuous: WAL archiving (every 60s) Documentation (docs/POSTGRES_BACKUP.md): - Complete restore procedures (full, PITR, single DB) - First-time setup instructions - Monitoring and alerting integration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
386 B
Text
22 lines
386 B
Text
[global]
|
|
# Repository location (inside pgbackrest container, mapped to host SSD)
|
|
repo1-path=/var/lib/pgbackrest
|
|
repo1-retention-full=4
|
|
repo1-retention-diff=14
|
|
|
|
# Compression
|
|
compress-type=zst
|
|
compress-level=3
|
|
|
|
# Parallelism
|
|
process-max=2
|
|
|
|
# Logging
|
|
log-level-console=info
|
|
log-level-file=detail
|
|
|
|
[mana]
|
|
pg1-path=/var/lib/postgresql/data
|
|
pg1-host=postgres
|
|
pg1-port=5432
|
|
pg1-user=postgres
|