Skip to content

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.

  1. Download the binary and the checksum file:

    bash
    curl -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/SHA256SUMS
  2. Check the download:

    bash
    sha256sum --ignore-missing -c SHA256SUMS

    It prints the file name followed by OK. Do not install the file if it prints FAILED.

  3. Install it as /usr/local/bin/lmdb-lws-backup:

    bash
    sudo install -m 755 lmdb-lws-backup-0.2.0-linux-x86_64 /usr/local/bin/lmdb-lws-backup

    The supplied systemd units expect it at exactly this path.

  4. Check that it runs:

    bash
    lmdb-lws-backup --version

    It 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-dev on Debian and Ubuntu), or a static copy built by the script in the repository

LMDB and the TOML parser are included in the source.

  1. Install the tools. On Debian or Ubuntu:

    bash
    sudo apt install build-essential cmake git
  2. Download the source at the release tag:

    bash
    git clone https://github.com/Dhiva-Labs/lmdb-lws-backup.git
    cd lmdb-lws-backup
    git checkout v0.2.0
  3. Build libsodium statically (skip this if you installed libsodium-dev):

    bash
    ./scripts/fetch-libsodium.sh
  4. Configure and build:

    bash
    cmake -B build -DCMAKE_BUILD_TYPE=Release
    cmake --build build -j"$(nproc)"
  5. Run the tests. They include an end-to-end backup, verify and restore:

    bash
    ctest --test-dir build
  6. Install:

    bash
    sudo 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:

FileUsed for
config.example.tomlThe starting point for your configuration.
systemd/lmdb-lws-backup.service and .timerDaily backups with a systemd timer (recommended).
systemd/lmdb-lws-backup-daemon.serviceThe 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.

Next steps ​