Skip to content

Backup LAVA

In order to backup LAVA you will have to backup both the database and specific directories.


For a native Debian install

The database is managed by PostgreSQL. See the PostgreSQL documentation for details.

To backup the database run:

sudo -u lavaserver pg_dump lavaserver > lava-server.sql

For the docker-compose solution

If you run your LAVA instance with docker-compose, you can backup the database like this:

docker exec --user postgres docker-compose_db_1 bash -c \
            "pg_dump --username=lavaserver lavaserver > /tmp/lavaserver.sql"

On the host, you can then retrieve the backup file. Example:

docker cp docker-compose_db_1:/tmp/lavaserver.sql .


The configuration files are stored in:

  • /etc/lava-coordinator/
  • /etc/lava-dispatcher/
  • /etc/lava-server/

The data (job outputs, ...) are stored in /var/lib/lava-server/default/media.

To backup the filesystem run:

tar czf lava-server-etc.tar.gz /etc/lava-coordinator/ \
                               /etc/lava-dispatcher/ \
tar czf lava-server-data.tar.gz /var/lib/lava-server/default/media/