Skip to content

Operator: set up regular backups (scripts/backup.sh) #411

Description

@CheeryProgrammer

A backup mechanism already exists (scripts/backup.sh / scripts/restore.sh, exercised by the CI "backup-restore (DR round-trip)" job) — it just needs to be scheduled on your host.

One-off backup (do this before deploying any release with a destructive migration, e.g. #393)

./scripts/backup.sh            # → backups/brainiac-<stamp>.sql.gz

Schedule daily (keeps the newest 14 by default)

crontab -e
# add:
0 2 * * * cd /path/to/brainiac && ./scripts/backup.sh >> backups/backup.log 2>&1

Restore drill (confirm you can actually recover)

./scripts/restore.sh backups/brainiac-<stamp>.sql.gz   # DESTRUCTIVE: overwrites the DB; asks for confirmation

Checklist

  • Ran scripts/backup.sh once; a .sql.gz appears under backups/
  • Cron entry added (daily)
  • Did a restore drill into a throwaway compose project to confirm recovery
  • Store copies off-box (encrypted) for real DR

Related: SYSTEM.md §16.

🤖 Generated with Claude Code

Metadata

Metadata

Labels

area:infraDeploy, Docker, DB, CI, opstype:opsOperations, security, backup, monitoring

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions