You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Postgres is configured with `archive_mode=on` and copies WAL files into a dedicated volume (`pgwal`). Use the provided scripts to create compressed base backups and prune old WAL/base backups.
98
+
## Backups (monthly SQL dumps)
99
+
The database dumps are split into public and private data, written to a Docker volume mounted at `/dumps` inside the Postgres container. Each month overwrites the same two files:
-`private/private-YYYY-MM.sql.gz` (data-only for private tables)
102
+
103
+
The table list lives in `deploy/backup/private_tables.txt` and is used for both dumps.
104
+
If you enable the `dumps.hackorum.dev` site in Caddy, only `/dumps/public` is mounted read-only in the Caddy container, so private dumps remain inaccessible.
99
105
100
106
Run (from `deploy/`):
101
107
```bash
102
-
./backup/run_base_backup.sh # creates tarred base backup under /backups
103
-
RETAIN=3 ./backup/prune_backups.sh # keep 3 most recent base backups, prune old WAL (>14 days)
108
+
./backup/run_monthly_dumps.sh
104
109
```
105
110
Recommended cadence:
106
-
- Base backup weekly (or more often if you prefer).
107
-
- Prune after each base backup.
108
-
- Monitor disk usage; adjust retention or add external storage later if needed.
111
+
- Run monthly (or more often if you want fresher dev data).
112
+
113
+
Example crontab (runs at 02:15 on the 1st of each month):
0 commit comments