Skip to content

SQLite

SQLite is the local dev/embedded default. Single-file database with zero configuration, perfect for development and testing.


StrengthBenefit
Zero setupNo server, no network
Single fileEasy backup, copy, share
ACID compliantFull transaction support
Fastest for localNo network round-trips
TestingPerfect for unit/integration tests

LimitationImpact
Single writerNo concurrent write scaling
Local onlyCan’t share across machines
File lockingPotential issues on network filesystems

[storage]
backend = "sqlite"
[storage.sqlite]
path = "./angzarr.db"
# Or in-memory for testing
# path = ":memory:"
Terminal window
export SQLITE_PATH="./angzarr.db"
export STORAGE_BACKEND="sqlite"

./angzarr.db # Default location
:memory: # In-memory (lost on exit)
/var/lib/angzarr/data.db # Production path

Angzarr enables WAL (Write-Ahead Logging) by default for better concurrency:

PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;

Benefits:

  • Readers don’t block writers
  • Writers don’t block readers
  • Better crash recovery

SQLite is the default for test suites:

Terminal window
# Run interface tests against SQLite
cargo test --test interfaces
# Fast, no containers needed
cargo test --lib

Simple file copy when database is quiet:

Terminal window
# Safe backup (uses SQLite backup API)
sqlite3 angzarr.db ".backup backup.db"
# Or just copy during low activity
cp angzarr.db angzarr.db.backup

For hot backups, use the SQLite backup API or filesystem snapshots.


  • Development — Fast iteration, no setup
  • Testing — Isolated, deterministic
  • Embedded — Single-process applications
  • Prototyping — Get started immediately
  • Edge — Limited resources, no network