Install
lmdb-lws-backup is a single program. Install the prebuilt binary on x86-64 Linux, or build it from source on any Linux machine.
Install the release binary (x86-64)
The current release, v0.2.0, has one binary, lmdb-lws-backup-0.2.0-linux-x86_64, and a SHA256SUMS file for checking it. The binary includes LMDB, libsodium and the C++ runtime; it depends only on the system's C library (glibc). The project states that its prebuilt binaries need glibc 2.38 or newer, as on Ubuntu 24.04 or Debian 13. Check yours with ldd --version. On older systems, build from source.
Download the binary and the checksum file:
bashcurl -LO https://github.com/Dhiva-Labs/lmdb-lws-backup/releases/download/v0.2.0/lmdb-lws-backup-0.2.0-linux-x86_64 curl -LO https://github.com/Dhiva-Labs/lmdb-lws-backup/releases/download/v0.2.0/SHA256SUMSCheck the download:
bashsha256sum --ignore-missing -c SHA256SUMSIt prints the file name followed by
OK. Do not install the file if it printsFAILED.Install it as
/usr/local/bin/lmdb-lws-backup:bashsudo install -m 755 lmdb-lws-backup-0.2.0-linux-x86_64 /usr/local/bin/lmdb-lws-backupThe supplied systemd units expect it at exactly this path.
Check that it runs:
bashlmdb-lws-backup --versionIt prints
lmdb-lws-backup 0.2.0.
Build from source
Build from source on ARM64, on distributions older than glibc 2.38, or if you prefer to compile it yourself.
What you need
- GCC 10 or newer, or Clang
- CMake 3.16 or newer
- Git
- libsodium: either the system development package (
libsodium-devon Debian and Ubuntu), or a static copy built by the script in the repository
LMDB and the TOML parser are included in the source.
Install the tools. On Debian or Ubuntu:
bashsudo apt install build-essential cmake gitDownload the source at the release tag:
bashgit clone https://github.com/Dhiva-Labs/lmdb-lws-backup.git cd lmdb-lws-backup git checkout v0.2.0Build libsodium statically (skip this if you installed
libsodium-dev):bash./scripts/fetch-libsodium.shConfigure and build:
bashcmake -B build -DCMAKE_BUILD_TYPE=Release cmake --build build -j"$(nproc)"Run the tests. They include an end-to-end backup, verify and restore:
bashctest --test-dir buildInstall:
bashsudo install -m 755 build/lmdb-lws-backup /usr/local/bin/
The same steps work on x86-64 and ARM64.
Files in the repository you will need
Keep the cloned repository, or download these files from it:
| File | Used for |
|---|---|
config.example.toml | The starting point for your configuration. |
systemd/lmdb-lws-backup.service and .timer | Daily backups with a systemd timer (recommended). |
systemd/lmdb-lws-backup-daemon.service | The alternative long-running daemon. |
Good to know
The source also contains packaging for Fedora, openSUSE and Arch Linux and an ARM64 binary build, but these are not part of a published release yet. Check the releases page for what is available.