Skip to main content

Module backup

Module backup 

Source
Expand description

The copy a run takes before its first write (§4 Phase 2, “Back up”): every database it will touch through SQLite’s VACUUM INTO (db_copy::copy_database, never a raw copy of a file in WAL mode), and every other file it will change or delete as it is, each with its SHA-256 in the journal. Also the digests restore mode compares.

Structs§

BackupList
What to back up: databases and plain files, by original path.

Functions§

copy_of
The copy of original among entries, checked against its recorded checksum.
db_digest
A digest of a database’s rows, every table, independent of row order and of how its pages sit in the file and its WAL: what changed and what didn’t, where a file checksum would differ after any checkpoint.
file_sha256
fingerprint
What path is now, for restore mode.
take
Copy every listed path into dir and describe each copy. A database that can’t be copied fails the run before anything is written; a file that is gone by now is skipped.