Skip to content

Operation and backups (Debian)

What How
Status systemctl status 'flyingmonit@*' -- the running slot's instance
Start, stop systemctl start flyingmonit@a, systemctl stop flyingmonit@a (or @b: the one in slot.env)
Is it healthy? curl http://127.0.0.1:8090/health (slot b: 127.0.0.2) answers {"status":"ok"}
Which version runs? readlink /var/lib/flyingmonit/current, or the page Admin › General
The server's log journalctl -u 'flyingmonit@*'

Backups and restore

Every update copies the database first (/var/lib/flyingmonit/backups/, the 10 newest are kept). For backups of your own, copy /var/lib/flyingmonit/db/ while FlyingMonit is stopped, or with sqlite3 ... ".backup ..." while it runs. The running slot is the one in /var/lib/flyingmonit/slot.env (SLOT=a or b); below, a.

Restore a copy

systemctl stop flyingmonit@a
cp -p /var/lib/flyingmonit/backups/<date>-<version>/flyingmonit.db* /var/lib/flyingmonit/db/
systemctl start flyingmonit@a

A copy belongs to the release named in its directory: restore it with that release running (below), or with a newer one, which migrates it on start.

Go back to an earlier release

The 3 newest releases stay in /var/lib/flyingmonit/releases/. Its database may already be migrated by the newer release, so go back together with the copy taken before the update:

systemctl disable --now flyingmonit-update.timer   # else it installs the newest again
systemctl stop flyingmonit@a
ln -sfn /var/lib/flyingmonit/releases/<version> /var/lib/flyingmonit/slot-a
ln -sfn /var/lib/flyingmonit/releases/<version> /var/lib/flyingmonit/current
cp -p /var/lib/flyingmonit/backups/<date>-<version>/flyingmonit.db* /var/lib/flyingmonit/db/
systemctl start flyingmonit@a