Repository navigation
Releases
v0.2.0 — back up any LMDB environment
v0.2.0 — back up any LMDB environment
lmdb-lws-backup now takes encrypted hot backups of any LMDB environment, not just monero-lws. Existing v0.1 deployments keep working unchanged: default filenames, manifests, and verify behavior are fully backward compatible.
New
- Profiles (
[source] profile/--profile):auto(default) detects the monero-lws accounts table in the snapshot and keeps v0.1 behavior for monero-lws databases;monero-lwsis strict (verify fails if the accounts table is missing);genericis fully schema-blind for arbitrary LMDB databases. - Generic verification: every named table is decrypted into RAM and walked in full; plain key/value rows in the unnamed main DB are supported, so single-file and main-DB-only environments back up and verify cleanly. Generic manifests record
table_countandtotal_rowsinstead of account data. [backup] filename_prefix: backups are named<prefix>-YYYYMMDD.lmdbbak.encwith prefix-scoped retention, so multiple databases can share one destination directory. Default remainslws-backup.[source] max_named_dbs(1–4096) with adaptive reopening for environments with many named tables.- data.mdb path guard: a
db_pathpointing at adata.mdbfile with a siblinglock.mdbis treated as its parent directory environment — opening the file directly would coordinate through a separatedata.mdb-lockthe live writer never reads, risking a torn snapshot. If bothlock.mdbanddata.mdb-lockexist, the layout is ambiguous and the tool refuses to open rather than guess.
Fixed
- A failed restore (e.g. a forced-profile mismatch detected after decryption) now removes the decrypted
data.mdbagain instead of leaving plaintext behind and blocking a corrected retry.
Unchanged guarantees
Read-only MVCC snapshots that never block or resize the live database; plaintext never touches persistent storage (pipe-streamed encryption, memfd verification); a failed copy can never produce a file that passes verification; retention never deletes the newest N backups.
Asset
lmdb-lws-backup-0.2.0-linux-x86_64 — stripped Release build, dynamically linked against glibc only (LMDB and libsodium statically linked). Verify with SHA256SUMS. Building from source: see the README.
Guide: lmdb-lws-backup on learn.dhivalabs.com: install steps, a beginner guide and troubleshooting.