Developer beta 0.1.0-beta.1 documentation. The build is not available for download yet; these pages describe the beta as built and tested on Linux x86-64.
Restore
holadb restore ./backups/shop-2026-09-26 ./shop-restored
holadb verify ./shop-restored
holadb serve ./shop-restored …
restore:
- verifies the backup (and every base it references) — a corrupt, truncated, incomplete or relocated-but-broken backup is refused before anything is written;
- creates
<dir>.restoringwith a restore marker (RESTORE_INCOMPLETE) before copying anything, copies every file (each checked against its SHA-256 as it is copied) and makes everything durable; - opens the restored database there (recovery runs) and verifies it in full: every segment against its hashes, every table’s state against a replay of its storage, every row against its schema, every secondary index against the rows, the control journals, the catalog;
- only then removes the marker and renames the directory to
<dir>.
A directory holding the restore marker is refused by every command and by
the server (… holds a restore that did not complete …: it is not a database). So a restore that stopped anywhere — killed, out of disk, an
I/O error — can never be mistaken for a database. Run the same restore
again: it removes the leftover and starts over. A failed restore never
touches anything but <dir> and <dir>.restoring.
The report lists, per table, the rows, the index entries and a
row digest (SHA-256 over every row): two restores of the same state
print the same digests. --json gives the same as JSON.
The target directory must not exist or must be empty; restore never
overwrites a database. To replace a live database, stop the server, move
the old directory aside, restore, start the server.
Point-in-time restore
holadb restore ./backups/shop-base ./shop-latest --archive /archive/shop-gen7
holadb restore ./backups/shop-base ./shop-at-9001 --archive /archive/shop-gen7 --to-position 9001
With --archive, the restore replays the archived write-ahead logs onto
the backup: to the last archived commit, or with --to-position N to the
last commit at or before commit position N (holadb snapshot prints a
backup’s position; a client’s position() gives the current one). A
multi-table transaction is restored entirely or not at all; a position in
the middle of a commit restores the commit before it. The report states
the position reached.
Refused, with nothing written: an archive that does not reach back to the
backup (it was started later), a position before the backup, a position
past the end of the archive (the message names the last position the
archive reaches; leave --to-position out for the latest), and a position
past a schema change after the backup. Only the archive steps the target
needs are read and checked: if a later step is damaged or missing, earlier
positions still restore, and holadb verify-archive names the last
position that can be reached.
A restored database is a full, independent copy: users, roles, schema and data. Writing to it does not affect the backup or the original.