Skip to main content

Module backup

Module backup 

Source
Expand description

Portable .nbkp backup and restore.

Online logical export of all entries via a redb read-txn snapshot; restore replays into a single redb write transaction. The Rust core is schema-agnostic — the schema hash, when known to the caller, is recorded in the backup header.

Structs§

BackupStats
Statistics returned by a successful write_backup call.
RestoreOptions
Options controlling restore behaviour.
RestoreStats
Statistics returned by a successful restore call.

Functions§

backup_to_path
Writes a backup to path atomically: first to <path>.tmp, then fsync, then rename.
read_backup
Reads a .nbkp v1 stream from r into db according to opts.
restore_from_path
Reads a backup file at path and restores it into db per opts.
write_backup
Streams every (composite_key, value) entry in db to w in the .nbkp v1 format.