# Running Jarl ## Day to day | Task | How | |------|-----| | Is everything healthy? | `jarl status`, or the web UI dashboard: named reachable, adoption, drift, open changesets, configuration problems, the newest backup, tokens about to expire | | Are the secondaries up to date? | `jarl zone serials ZONE`, or the zone's Name servers tab ([below](#checking-name-servers-and-the-delegation)) | | Back up / restore | Daily by `jarl-backup.timer`; by hand `sudo jarld backup`; restore with `jarld restore` ([below](#backups)) | | DNSSEC | `jarl zone dnssec status ZONE`, or the zone's DNSSEC tab ([dnssec.md](dnssec.md)) | | What changed and who did it? | `jarl history`, `jarl changeset show ID` (with diff), `jarl audit` | | Undo a change | `jarl changeset revert ID`, review it, then `jarl changeset apply NEW_ID` (or History → Revert in the UI) | | Check the configuration | `jarl check`: full validation plus `named-checkconf -z` | | Logs | `journalctl -u jarl` (jarld, including `msg=audit` lines), `journalctl -u named` | | Restart / reload TLS | `systemctl restart jarl` / `systemctl reload jarl` | | Work on the server itself | `sudo jarl ...`: root uses jarld's local socket and needs no token ([cli.md](cli.md#on-the-server-itself)) | | Renew or replace a token | `jarl token rotate NAME --grace 1h` (same grants, new secret; [permissions.md](permissions.md#rotating-a-token)). `jarl token list --all --expiring` shows those that expire within 14 days | | Upgrade Jarl | Debian packages: build the new ones and `sudo apt install ./dist/jarl*_amd64.deb` (server and CLI); otherwise `make && sudo make install && sudo systemctl restart jarl`. jarld upgrades its database when it starts | Restarting jarld doesn't affect DNS: named keeps serving the files it loaded. jarld is only needed to make changes. ## Backups Everything Jarl knows is in its database (`/var/lib/jarl/jarl.db`): zones, records, views, ACLs, TSIG keys, options, users, tokens, history and the audit log. named's files are generated from it. The one exception is the DNSSEC keys of signed zones, which named keeps in Jarl's key directory (`/var/lib/bind/jarl/dnssec-keys`): every backup stores those too, inside the backup file ([dnssec.md](dnssec.md#keys-backups-and-moving-servers)). ### The daily backup The `jarl-backup.timer` systemd timer runs `jarld backup` once a day. The Debian package turns it on; after `make install`, turn it on yourself: ```sh systemctl enable --now jarl-backup.timer systemctl list-timers jarl-backup.timer # when it runs next ``` Each run: 1. writes a consistent copy of the database with SQLite's `VACUUM INTO` (safe while jarld runs and changes things) to a temporary file in the backup directory; 2. stores the DNSSEC keys in it (every file of the key directory, private keys included); 3. checks the copy with SQLite's `integrity_check`, and only then gives it its name, `jarl-.db`, e.g. `jarl-20261008T031512Z.db`. A file with that name is always a complete, intact backup; 4. deletes backups older than `retention`, but always keeps the newest `keep_at_least`, however old they are. If backups stop for a while (the machine was off, the disk was full), the old ones aren't all deleted by the next run. Ages come from the time in the name, not the file's modification time, which copying the directory would change. Only files named `jarl-