FrankenTerm

Backup, Restore, and Retention

144 words1 min read4 subsectionsFrom the README at ft 0.15.21

On this page4
Scheduled backups ([backup.scheduled])Manual backupsRetentionDisaster recovery drills

Scheduled backups ([backup.scheduled])

toml
[backup.scheduled]
enabled = false                       # off by default
schedule = "daily"                    # hourly, daily, weekly, or 5-field cron
retention_days = 30
max_backups = 10
destination = "~/.local/share/ft/backups"

Each backup uses the SQLite online backup API for a consistent snapshot. The output archive contains:

  • The database binary (zstd-compressed only when scheduled backups set [backup.scheduled].compress = true; the default is uncompressed)
  • A JSON manifest with SHA-256 checksums + bundle metadata
  • Optional SQL text dumps for human inspection

Manual backups

bash
ft backup export --output /tmp/ft-snapshot                # produces a portable, checksummed backup directory
ft backup export --sql-dump                               # also include a SQL text dump for human inspection
ft backup import /tmp/ft-snapshot                         # restore with a safety backup of current data first
ft backup import /tmp/ft-snapshot --verify                # verify integrity without importing
ft backup import /tmp/ft-snapshot --dry-run --yes         # show what would happen

Retention

Retention is governed by both retention_days and max_backups. Whichever bound is hit first triggers pruning. Pruning runs after each scheduled backup; it deletes old archives on disk and writes no audit row.

Disaster recovery drills

disaster_recovery_drills (see deep dive above) models backup/restore drills against operator-defined RTO/RPO targets. Nothing schedules or invokes it today, so no drill runs on its own. Reports include pass / fail / degraded verdicts. The ContinuityReport cold-start case was fixed in 2026-04 to report Unknown (not Healthy) when no drills have run yet; see CHANGELOG / br-ft-38rxl.