Kalzit is in early development. These pages describe what exists today and change as the milestones progress. Screenshots show the development version with demo data.
Backup and restore
What to back up, how to take a consistent copy while Kalzit runs, and how to restore it, for SQLite and PostgreSQL as Kalzit’s own database, on Linux, Windows and in a container. Practise the restore once (the drill at the end) before you rely on it.
Kalzit can back itself up on a schedule (see scheduled backups), or you run the steps below from your usual backup tool or a timer. The built-in updater also backs up the SQLite database before every update it installs itself (not before a package, MSI or image upgrade), and Administration (Verwaltung) > Updates has Back up now; those copies stay on the same disk and are meant for returning from an update, not as your only backup (updates guide).
Scheduled backups
With backups.schedule_enabled and a saved backup target, the server (with several servers: the
leader) takes a backup every backups.interval_hours hours: one file
kalzit-backup-<UTC time>.zip.enc with a consistent copy of the database (SQLite), acme/,
plugins/ and kalzit.toml. It is encrypted with the secrets key (backups.encrypt, on by
default; without encryption kalzit.toml is left out, as it may hold secrets) and never holds the
key itself: keep the key apart, as below. The target is a directory
an administrator allowed in backups.allowed_dirs (never the data folder) or a bucket of an
S3-compatible store (Amazon S3, MinIO, Ceph, Garage; Kalzit never creates the bucket). The target
is saved only after a connection test passed. The newest backups.keep_count (14) backups stay at
the target. Every run is in the run history and the audit log (docs/api/backups.md).
With PostgreSQL, a scheduled backup holds the files only and a note that points to pg_dump
(below): back the database up with the tools of PostgreSQL.
Restore from a Kalzit backup
Only from the command line, on the stopped server, with the secrets key the backup was taken with:
sudo systemctl stop kalzit
sudo -u kalzit kalzit backup restore /srv/backup/kalzit-backup-20261114T020000.000Z.zip.enc --yes
sudo systemctl start kalzitOn Windows run kalzit.exe backup restore <file> --yes from an elevated prompt with the service
stopped. The command replaces the database (SQLite) and the acme/ and plugins/ folders; the
previous folders stay next to them as <name>.before-restore-<time>. The backup’s kalzit.toml
is written as kalzit.toml.restored in the data folder for you to compare; the configuration in
force is never overwritten.
What to back up
| What | Where | Why |
|---|---|---|
| The database | SQLite: kalzit.db in the data folder (with kalzit.db-wal and kalzit.db-shm while it runs). PostgreSQL: the database in database.url |
Everything you made in Kalzit: organizations, people, dashboards, data sources, settings, the audit log; data source passwords and tokens encrypted |
| The secrets key | KALZIT_SECRETS_KEY, the systemd credential kalzit-secrets-key (the deb and rpm put it in /etc/credstore.encrypted/ or /etc/credstore/), the Docker secret kalzit-secrets-key, or a key file in the data folder (secrets.key on Linux, secrets.key.dpapi on Windows) |
Without it the stored passwords, tokens, AI provider keys, the mail server’s password and the ACME files cannot be decrypted |
acme/ in the data folder |
account-<hash>.enc and certificate.enc |
The ACME account and the certificate Kalzit ordered, encrypted with the secrets key. With several servers on PostgreSQL the certificate is also in the database |
plugins/ in the data folder |
The installed plugin packages, unpacked | The database lists the plugins; on SQLite the packages exist only here. With several servers on PostgreSQL they are also in the database |
kalzit.toml |
/etc/kalzit/kalzit.toml (packages), %ProgramData%\Kalzit\kalzit.toml (Windows), or the file you start Kalzit with |
Addresses, HTTPS, proxies, the database URL |
| Certificate files | tls.cert_file and tls.key_file, if you use your own |
HTTPS |
The rest of the data folder can be backed up as well, but is not needed for a restore:
updates/ (downloads, kept versions and the update backups), logs/ (Windows), tls/ (the
Windows installer’s self-signed certificate, made again when missing) and samples/ (the sample
database, written again when someone adds the sample data). Do not restore kalzit-node-id onto
another machine that runs at the same time as the original (see several servers).
The secrets key belongs to the backup. Keep a copy of it apart from the database backup, for
example in your password manager, and keep old keys as long as you keep backups taken with them
(kalzit secrets rotate changes the key; see the README).
- On Linux with the packages, the key in
/etc/credstore.encrypted/is encrypted with the host’s credential key,/var/lib/systemd/credential.secret: back that file up too, or a restore on other hardware cannot read the key. - On Windows,
secrets.key.dpapican only be decrypted on the same computer. Copied to another computer, it makes Kalzit refuse to start. When you restore on other hardware, leave that file out: Kalzit then makes a new key, every stored password, token and key has to be entered again, and ACME orders a new certificate. To restore on other hardware without that, run Kalzit withKALZIT_SECRETS_KEYfrom the start and keep that key.
SQLite
While Kalzit runs
Never copy only kalzit.db of a running server: what is still in kalzit.db-wal would be lost.
Take a consistent copy with the SQLite shell instead, as the account Kalzit runs as or as root:
# Linux (packages): one consistent file, safe while Kalzit runs
sudo -u kalzit sqlite3 /var/lib/kalzit/kalzit.db "VACUUM INTO '/var/lib/kalzit/backup-$(date +%F).db'"
sudo tar -C /var/lib/kalzit -czf /srv/backup/kalzit-$(date +%F).tar.gz \
backup-$(date +%F).db acme plugins
sudo rm /var/lib/kalzit/backup-$(date +%F).db
sudo cp /etc/kalzit/kalzit.toml /srv/backup/.backup <file> in the sqlite3 shell works as well. On Windows, run sqlite3.exe from an
elevated prompt the same way, with the database at %ProgramData%\Kalzit\data\kalzit.db, and copy
acme and plugins next to it. Back up now on the Updates page makes the same kind of copy
(VACUUM INTO) in updates/backups and offers it for download; the download is in the audit log.
With Kalzit stopped
Stop the service (sudo systemctl stop kalzit, Stop-Service Kalzit, docker stop --time 30 kalzit), copy the whole data folder, start it again. After a clean stop kalzit.db-wal and
kalzit.db-shm are usually gone; if they are there, copy them together with kalzit.db.
For a container, copy the volume while the container is stopped:
docker stop --time 30 kalzit
docker run --rm -v kalzit-data:/data:ro -v "$PWD":/backup alpine \
tar -C /data -czf /backup/kalzit-data.tar.gz .
docker start kalzitCompose prefixes the names with the project (by default the folder’s name): the volume is then
for example kalzit_kalzit-data and the container kalzit-kalzit-1; docker volume ls and
docker compose ps show them.
Restore
- Install the same Kalzit version the backup was taken with (a newer version migrates the database on its first start; an older one cannot open a database a newer one migrated).
- Stop Kalzit.
- Put the files into the data folder: the database as
kalzit.db(remove akalzit.db-walandkalzit.db-shmleft from before),acme/andplugins/.-
Copy, do not move. A copied file takes the data folder’s private permissions; a moved one keeps its old ones, and Kalzit refuses to start with it. On Windows, tools that copy permissions (
robocopy /COPYALLor/SEC,xcopy /O) keep foreign entries as well: use a plain copy, or runicacls <file> /resetafterwards. -
On Linux the files must belong to the account Kalzit runs as (
sudo chown -R kalzit:kalzit /var/lib/kalzit), and the folder must stay closed to others (chmod 700). -
In a container, restore into the stopped container’s volume and give the files to the image’s user:
docker stop kalzit docker run --rm -v kalzit-data:/data -v "$PWD":/backup alpine \ sh -c 'rm -rf /data/* && tar -C /data -xzf /backup/kalzit-data.tar.gz && chown -R 65532:65532 /data && chmod 700 /data' docker start kalzit
-
- Put back
kalzit.tomland the secrets key the backup was taken with (on Windows on another computer, withoutsecrets.key.dpapi, see above). - Start Kalzit and check the log: a warning that stored secrets use keys which are not loaded means the key is not the one the backup was taken with.
PostgreSQL
Kalzit cannot back up a PostgreSQL database itself. Use the tools of PostgreSQL, while Kalzit runs:
pg_dump --format=custom --file=kalzit-$(date +%F).dump "postgres://kalzit@db.internal/kalzit"Back up the data folder’s acme/ and plugins/ and kalzit.toml of each server as well, and the
secrets key, which every server shares.
To restore, stop every Kalzit server, restore into an empty database and start one server, then the others:
createdb -O kalzit kalzit
pg_restore --no-owner --role=kalzit --dbname="postgres://kalzit@db.internal/kalzit" kalzit-2026-11-04.dumpThe version rule is the same as for SQLite: start the version the dump was taken with, or a newer one. Point-in-time recovery, replicas and failover (Patroni, a managed database) are PostgreSQL’s job; Kalzit reconnects after a failover.
Several servers
With several Kalzit servers on one PostgreSQL database
(operator guide), the database and the secrets key are
shared; each server’s data folder is its own. Back up the database once and kalzit.toml of
each server. To rebuild a server, start Kalzit with an empty data folder, the same database URL
and the same key: it registers itself and unpacks the plugins from the database. Do not copy a
data folder to set up another server; its kalzit-node-id would make two servers one.
Restore drill
Try the restore on a second machine or a virtual machine once, and after every change to how you back up:
- Install the Kalzit version of the backup there, without starting it (with the packages, stop the service right after the installation).
- Restore the database (or the dump),
acme/,plugins/,kalzit.tomland the secrets key as above. Changeserver.public_urland the addresses inkalzit.tomlif the test machine has another name, and keep it away from your production data sources if a test run should not query them. - Start Kalzit and check:
- you can sign in, and dashboards, folders and saved analyses are there;
- Test connection on a data source with a password succeeds (the key is right);
- Settings > Plugins (Einstellungen > Plugins) lists the plugins as running;
- the audit log ends at the time of the backup;
- with ACME, the certificate card shows the certificate of the backup.
- Note how long the restore took, then remove the test installation.