Skip to content

Database backup and restore #19

@benSlaughter

Description

@benSlaughter

If the server dies, all progress is lost. Parents should be able to backup/restore easily.

Admin settings page:

  • "Download Backup" button → downloads spellbound.db file
  • "Restore from Backup" → file upload that replaces the database (with confirmation dialog)

API:

  • GET /api/admin/backup → streams the SQLite file
  • POST /api/admin/restore → accepts multipart upload, validates it's a valid SQLite file, replaces current DB

Safety: Auto-backup before restore (keep last 3 backups in data/backups/).

Metadata

Metadata

Assignees

No one assigned

    Labels

    devCode, infra, testing, performancemedium-termDeepen & expand — 1-2 months

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions