Automated Postgres Backups
You can run daily automated backups usingpg_dump wrapped in a cron job:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Procedures for automated database backups, snapshots, and point-in-time recovery.
pg_dump wrapped in a cron job:
#!/bin/bash
BACKUP_DIR="/var/backups/indic8"
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
FILENAME="$BACKUP_DIR/indic8_backup_$TIMESTAMP.sql.gz"
mkdir -p $BACKUP_DIR
docker exec -t indic8-postgres pg_dump -U indic8_user indic8_db | gzip > $FILENAME
# Keep 30 days of retention
find $BACKUP_DIR -type f -name "*.sql.gz" -mtime +30 -delete
# Decompress and stream into the Postgres container
gunzip -c /var/backups/indic8/indic8_backup_20260913_120000.sql.gz | \
docker exec -i indic8-postgres psql -U indic8_user -d indic8_db