Executable eLyKseeR Docker image

Fast ramp-up with our Docker image for Coq/OCaml development of eLyKseeR.

containers on ship
Photo by Rinson Chory / Unsplash

This Docker image contains just the compiled command line programs of eLyKseeR to run backups and file restore on your computer.

Visit Docker Hub: https://hub.docker.com/r/codieplusplus/elykseer-ml-binaries

Pull the image

There are images for Intel/AMD CPUs:

docker pull codieplusplus/elykseer-ml-binaries:${ARCH}

or, ARM (aarch64) processors like on the newer Macs M[123]:

docker pull codieplusplus/elykseer-ml-binaries:${ARCH}
$ARCH indicates the platform (arm64 | amd64)


We are using Docker volumes to store chunks and meta data independent of the container's lifecycle. Create these volumes, if not already present:

docker volume list

docker volume create elykseer_db
docker volume create elykseer_chunks

Running a backup

Let's start with defining some settings:

mkdir -vp ${TGTDIR}
$SRCDIR points to a directory that will be mounted read-only into the container at /data; this will be the data to backup
$TGTDIR points to a directory which will contain the restored files

And, then run a container that will not be persisted after we leave it:

docker run -it --rm \
  -v elykseer_db:/home/coq/elykseer.db \
  -v elykseer_chunks:/home/coq/elykseer.chunks \
  --mount type=bind,source="${SRCDIR}",target=/data,readonly \
  --mount type=bind,source="${TGTDIR}",target=/restore \

For a first run, check that the permissions on these directories in the container are similar to these:

coq@1ab703a5a27c:~$ ls -ld elykseer.chunks elykseer.db
drwxrwsr-x 210 root coq 4096 May 16 22:15 elykseer.chunks
drwxrwsr-x   3 root coq 4096 May 15 09:44 elykseer.db

# if necessary change with:
sudo chgrp coq elykseer.chunks elykseer.db
sudo chmod g+ws elykseer.chunks elykseer.db

We are located in the home directory of user coq where we set the identifier of our backups:

coq@c7d5c065ca31:~$ MYID=test

Let's start the shallow backup of only the files directly under /data :

coq@c7d5c065ca31:~$ lxr_backup -v -x ${HOME}/elykseer.chunks -d ${HOME}/elykseer.db -n 16 -i $MYID -D /data/
prepend '-R' to the argument '-D' to have the backup recurse into subdirectories

List meta data

A backup outputs encrypted chunks but also meta data which we can inspect:

coq@c7d5c065ca31:~$ irmin list
DIR test

coq@c7d5c065ca31:~$ irmin list $MYID
DIR relfiles
DIR relkeys

coq@c7d5c065ca31:~$ irmin list $MYID/relfiles
DIR 07
DIR 0e
DIR 2f
DIR 3a
DIR 3e
DIR 63
DIR aa
DIR fa
DIR fc

coq@c7d5c065ca31:~$ irmin list $MYID/relfiles/63
FILE 726563f83800d7c5d8ab76fbc71e2d38ba060df36a417eb9615bd3759380a699

Let's have a look at one of them using jq to format the output:

coq@c7d5c065ca31:~$ irmin get test/relfiles/63/726563f83800d7c5d8ab76fbc71e2d38ba060df36a417eb9615bd3759380a699 | jq
  "version": {
    "major": "0",
    "minor": "9",
    "build": "11"
  "fileinformation": {
    "fname": "/data/something.dat",
    "fhash": "726563f8..9380a699",
    "fsize": "64798",
    "fowner": "1000",
    "fpermissions": "644",
    "fmodified": "2022-07-31 17:51:59",
    "fchecksum": "9e76dd4b..2973fe25"
  "blocks": [
      "blockid": "1",
      "bchecksum": "b0ebf725..b4ff33d5",
      "blocksize": "32768",
      "filepos": "0",
      "blockaid": "35d5411f..5653bff3",
      "blockapos": "182033"
      "blockid": "2",
      "bchecksum": "82f178b5..e533c0bf",
      "blocksize": "32030",
      "filepos": "32768",
      "blockaid": "35d5411f..5653bff3",
      "blockapos": "150003"

The file has been backup in two blocks. The checksums of all blocks and the original file are remembered to decide later on a subsequent backup which parts of the file changed.

Restore a file

From the encrypted chunks and the saved meta data this file can be restored:

coq@c7d5c065ca31:~$ lxr_restore -v -x ${HOME}/elykseer.chunks -d ${HOME}/elykseer.db -i $MYID -o /restore/ /data/something.dat
INFO restoring file /data/Pergola.dxf from 2 blocks
  restored 1 files with 64798 bytes in total