Operate

Backup and restore.

Two commands and one SQLite file.

Backup and restore

This page is for self-hosted instances. Hosted users cannot download the SQLite database; export submissions as CSV from the dashboard instead.

A self-hosted instance keeps everything in one SQLite database, so backup means copying one file safely.

Backup#

sh
bun run backup -- ./backups

Backups use SQLite VACUUM INTO, are written with mode 0600, and old backups past BACKUP_RETENTION_DAYS are pruned. The command writes to the directory you pass. Store a separate encrypted copy away from the live volume.

Restore#

sh
# stop the application first
bun run restore -- ./backups/<backup.sqlite>

Restore replaces the live database file. Test a restore into a blank volume before you need one for real.

Stats#

sh
bun run admin:stats

Prints account, form, and submission counts without touching any payload.