12 Backup, verification and retention
| (require commerce/backup) | package: commerce |
Server processes explicitly require commerce/backup. Backups are only evidence when they are verified against the running store.
procedure
(snapshot-commerce-database! database-path destination-path) → void? database-path : path-string? destination-path : path-string?
Produces a consistent SQLite backup of a Commerce-owned database through
SQLite’s online backup API, read-only on the source.
The verification verdict with its checked details, including the backup’s
schema version.
procedure
(verify-commerce-backup original-storage backup-path #:now now) → backup-verification? original-storage : commerce-storage? backup-path : path-string? now : exact-nonnegative-integer?
Opens the backup read-only and verifies its schema version and recorded
facts against the original storage. A backup that does not match the
original’s schema version is not a usable backup.