Skip to content

Database backup #655

Closed
Closed

Description

@arnodelorme

Cloudfare database could be hacked or corrupted.

We should back it up regularly.

Activity

  1. added
    enhancement
    on May 29, 2026
  2. added
    P1
    on Jun 2, 2026
  3. neuromechanist commented on Jun 2, 2026

    @neuromechanist
    Contributor

    On it, there is a reorganization of the database c.f. #646. We will setup a worker for this afterward.

  4. neuromechanist commented on Jun 18, 2026

    @neuromechanist
    Contributor

    Tracked and expanded by epic #794 (private hourly D1 backup repo + restore + local-run harness). This issue is now a sub-issue of #794.

  5. neuromechanist commented on Jun 18, 2026

    @neuromechanist
    Contributor

    Done. Delivered via epic #794 as the private repo nemarOrg/nemar-db-backup:

    • Hourly GitHub Actions cron backs up prod D1 (`nemar-db`) to plaintext SQL, committing only when the data changes (git history = point-in-time recovery). Now LIVE and verified — first scheduled snapshot committed (4079 rows).
    • Every backup is self-verified (restored into a throwaway SQLite, row/fts5/FK-checked) before publishing.
    • Disaster-recovery restore (`restore-remote.sh`, validated into a throwaway D1) and a run-the-Worker-locally harness (`run-local.sh`) included.
    • D1 is the only stateful CF resource backed up; Vectorize is rebuildable, Analytics Engine is telemetry.

    This addresses the "could be hacked or corrupted; back it up regularly" concern with hourly, self-verifying, restorable snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions