LLevelUp
0
← Back to topic

Backups and Restore

A backup you have never restored is only a hope. Backups must include the data that cannot be recreated: databases, uploads, generated files, and critical config.

pg_dump "$DATABASE_URL" > backup.sql
tar -czf uploads.tar.gz /var/www/app/uploads

Store backups outside the server: object storage, another machine, or a managed backup service.

IMPORTANT

Document restore steps. In an incident, guessing the restore process wastes time and increases risk.

Further Learning

  • “database backup restore test” — restore validation
  • “3-2-1 backup rule” — backup strategy
  • “pg_dump restore basics” — PostgreSQL example