Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

DB snapshot — atomic SQLite backup with WAL checkpoint.

Creates a consistent copy of the database by issuing a WAL checkpoint then performing an atomic file copy. Tracks snapshots in backup_snapshots.

Functions§

backup_dir
Default backup directory under the data root.
create_snapshot
Create an atomic snapshot of the SQLite database.
get_snapshot
Find a snapshot by ID.
list_snapshots
List all recorded snapshots, newest first.
verify_snapshot
Verify a snapshot file matches its recorded checksum.