← All templates

Encrypted daily backups, restore tested every month.

Spec — Backups and restore

Status: draft · Created: 2026-11-10

1. Context and goal

Data survives a deleted table, a broken disk or a lost region, because backups are taken, protected and restored on a schedule.

2. Functional requirements (EARS)

  • FR-1: THE SYSTEM SHALL take a full backup of every database every day and keep write-ahead logs so data can be restored to any point in the last 7 days.
  • FR-2: THE SYSTEM SHALL encrypt backups with AES-256 before they leave the server and keep the keys apart from the backups.
  • FR-3: THE SYSTEM SHALL store backups in a second region, immutable for their retention of 30 daily and 12 monthly copies.
  • FR-4: IF a backup fails or has not finished by its deadline, THEN THE SYSTEM SHALL alert the on-call engineer within 15 minutes.
  • FR-5: THE SYSTEM SHALL restore the latest backup into an isolated environment every month and check row counts and checksums against the source.
  • FR-6: THE SYSTEM SHALL restore a production database within 4 hours with at most 15 minutes of data lost, measured in each monthly test.

3. Out of scope

  • Backups of developer laptops.
  • Restoring single records on user request.