All documentation pages ↓

On this page

Backups and restore

LiteBlox's zone history covers every zone's records, and its database holds each node's settings, ACLs and keys. Node backups are the files themselves, as BIND sees them on each server: the generated configuration, every zone file (dynamic zones and secondaries' copies included), the key files, and the server's original configuration in /etc/bind/pre-liteblox/. They're what you need to rebuild a dead server.

What's in a backup

A .tgz of:

Files keep their owner, group and mode, and directories are included (so /etc/bind comes back as root:bind with its setgid bit).

Key files (*.key, rndc.conf, bind.keys, and the keys.conf LiteBlox writes with every TSIG key) are included by default, because a restore is useless without them. Untick Include key files on a node's Backups page if the backups folder isn't private.

When backups happen

Kind When
scheduled daily at backup_at (default 03:15, container time); skipped when nothing changed since the last backup (the list shows "unchanged at …")
manual Back up now on a node's Backups page, or liteblox backup run NODE
pre-change automatically before every configuration change LiteBlox makes: takeover, zones (create, add/remove node, settings, dynamic switch, delete), server settings, ACLs, keys, primary, promote and demotion
pre-bootstrap over SSH, right before setup changes anything

Publishing zone contents doesn't trigger a node backup: the zone history has every version, and the agent keeps the last 10 copies of each zone file in /var/lib/liteblox-agent/backups/ on the node.

Where they're kept

In the ./backups folder of the LiteBlox host, one folder per node:

backups/ns1/ns1-20261025-031500.tgz
backups/ns1/ns1-20261025-142217-manual.tgz
backups/ns1/ns1-20261024-203957-prebootstrap.tgz

Files are readable by the owner only. Point ./backups at a NAS share if you want them off the host.

Retention

Kept:

Older ones are deleted after each backup run.

Watching them

Restoring a node

On the server (or a fresh replacement prepared with Preparing a node, steps 1–5):

tar zxf ns1-YYYYmmdd-HHMMSS.tgz -C /
named-checkconf -z
systemctl restart named

That puts back /etc/bind and any zone files elsewhere, with their owners and modes. The backup's manifest lands in /var/lib/liteblox-agent/restored-backup/.

Then in LiteBlox:

Disaster recovery

Node backups bring back a server. If you lose LiteBlox itself (the host, or the ./data volume), restore your copy of ./data instead (What to back up): it holds the database, the zone history, the certificate authority the agents trust, and the session key. With it, nothing is lost and the agents keep trusting LiteBlox.

Without a copy of ./data: re-adopt the nodes

The nodes keep running without LiteBlox, and each one holds what LiteBlox gave it: every key with its secret, the ACLs, its server settings, the zones with their grants and contents, which node is the primary, (with Kea) the subnets, reservations, the failover pair and where clients are registered in DNS (LiteBlox's own primary, or another DNS server with its key), and (with chrony) the time sources and which nodes serve time. Nodes without BIND (DHCP- or Time-only) come back the same way, from their Kea and chrony config. A new LiteBlox rebuilds its data from them:

  1. Install LiteBlox again and create the first admin (Installing).
  2. Nodes → Add node for each of the old nodes, under its old name (a DHCP failover pair knows its nodes by name). A node that ran without BIND is added the same way, with Runs DNS (BIND) unticked.
  3. Set up / Repair each one with the setup account. That gives its agent a certificate from the new LiteBlox's CA and changes nothing else; the job says the node's config came from another LiteBlox. Leave DHCP and Time unticked: a config a LiteBlox wrote is kept either way.
  4. The Nodes page now offers re-adopt them. Tick every node the old LiteBlox managed (the primary and its secondaries, both nodes of a failover pair) and click Preview.
  5. The preview lists what comes back, and checks each node: LiteBlox renders its config from the rebuilt data and compares every generated file, byte for byte, with the one on the node. Only when all of them match does Re-adopt appear. A node an older LiteBlox wrote lacks what newer versions add (3.3's BIND statistics channel and Kea's socket retries): the preview allows for exactly those and says the node was written by an older LiteBlox: brought up to date after re-adopt. The health check then writes it the current config, as after any upgrade (a failover pair's Kea gets it right away, with its new certificates).

The re-adopt changes nothing on the nodes, so DNS and DHCP keep serving throughout. There's one exception: a DHCP failover pair gets new peer certificates from the new CA (the old CA is gone, and the old private keys can't be read back). They're written to the standby first, then the primary, and the job waits until the pair is back in hot-standby. The primary keeps serving the whole time.

What doesn't come back:

The preview refuses, and records nothing, when:

IPAM doesn't come back: its networks, ranges and IPAM records live only in LiteBlox, so only a copy of ./data has them. Scanner nodes hold nothing to rebuild: add them again and run Set up / Repair, and they work as before.

From the command line: liteblox node readopt NAME… shows the same preview and asks before going ahead.