Backup and restore
The built-in daily backup, how to verify it, how to restore on Windows, RHEL and Docker, and what is covered.
What a backup contains
One backup is one zip file named farwatch-backup-yyyyMMdd-HHmmss.zip. It holds:
- manifest.json, with the version, the host, the time, the reason, one sha256 checksum per file, and a fingerprint of the encryption key.
- The install-wide database, global.db: the tenant list, global accounts, install settings and the backup history.
- For every active tenant, a data database (polled history and platform data) and an admin database (accounts, groups, grants, sessions, settings and installed plugin records). A single-tenant install has one tenant, default.
- The engine settings file, when it exists.
- Every installed plugin pack.
- The .env file, only when the setting Include the .env file is on.
Each SQLite database is copied with a consistent snapshot on a separate read-only connection in a worker thread, so neither the web nor the poller process stalls while it runs. The files of one tenant are copied one after the other, so a tenant's data and admin files can differ by a few seconds. Closed tenants are not included. Their sealed archives are kept under the tenant retention setting.
It does not replace a host backup or a virtual machine snapshot.
Schedule, location and keep count
The poller runs a backup every day at the configured time, 02:30 server time by default. Global Settings > Backup and recovery sets the hour and minute, how many backups to keep (5 by default, up to 60), the backup folder and whether to include the .env file. A change takes effect within five minutes with no restart. This page is visible to global administrators only. On a single-tenant install, members of the Admin group count.
The default folder is a backups folder inside the data folder. That keeps the backups on the same disk as the databases. It protects against corruption and mistakes but not against losing the disk. Point the folder at a different disk or a mounted share for real protection. The folder must be an absolute local path. UNC paths and paths inside the install folder (other than the data folder) are refused.
After each successful backup, the newest N zips in the folder are kept and older ones are deleted. A manual run from the page, or icc-cli backup, follows the same rules. Only one backup runs at a time. Before it starts, the backup checks that the folder has room for the databases plus 512 MB.
System Health raises two findings: no successful backup in the last two days while backups are on, and the newest backup having failed. Running, changing, downloading, deleting and restoring a backup each write a row to the audit log with the user name.
A backup that contains the .env file cannot be downloaded through the web page. Take it from the backup folder on the host. Including the .env file stays off by default.
The key fingerprint rule
Stored credentials are encrypted with ENCRYPTION_KEY from the install's .env file. The key is not inside the databases. A restored database is only useful with the same key, so the manifest records a fingerprint of the key, and a restore refuses on a mismatch. icc-cli restore --force overrides the check, and credentials stored under the old key then fail to decrypt and have to be entered again.
Keep the key somewhere separate from the backups. If you turn on Include the .env file, the zip carries the key and must be protected as tightly as the server.
Verify a backup
A backup that was never read back is a guess. Verify from the page, with Verify on a row, or from the command line:
icc-cli verify-backup <zip>Verify unpacks the databases to a temporary folder, compares every file with its checksum, and runs SQLite's quick check on each database. Run it after any change to the backup folder or storage, and test an actual restore on a spare host at least once a quarter.
Every backup carries manifest.sig, an HMAC-SHA256 signature of manifest.json keyed from the install key. Verify reports whether it matches. A restore refuses a zip whose signature is missing or does not match unless you pass --unsigned. A restore under a different key needs both --force and --unsigned.
Restore
A restore replaces the live database files, so it only runs while the services are stopped. The command refuses if another process holds a database file. Without --yes it prints the plan and writes nothing.
It verifies the zip, checks the key fingerprint, moves the current database files and the plugins folder to data.pre-restore-<stamp> inside the data folder, writes the files from the zip into place, and removes leftover -wal and -shm files. Nothing is deleted. The moved folder is yours to remove once you have checked the restore. The .env file in the zip is never written into place. Take it from the zip by hand if the host needs the old key.
Add --to <folder> to write everything into a scratch folder instead of the install. That is how to look inside a backup or rehearse a restore.
Windows
From an elevated PowerShell:
Stop-Service ICC-Poller, ICC-Dashboard
& "C:\Program Files\ICC\node\node.exe" "C:\Program Files\ICC\backend\icc-cli.js" restore "D:\FarWatchBackups\farwatch-backup-20261114-023000.zip" --yes
Start-Service ICC-Dashboard, ICC-PollerIf you ran the installer again on a new host, put the old ENCRYPTION_KEY into that host's .env file before the restore.
RHEL and other systemd hosts
sudo systemctl stop icc-poller icc-dashboard
sudo -u icc /opt/icc/node/bin/node /opt/icc/backend/icc-cli.js restore /var/backups/farwatch/farwatch-backup-20261114-023000.zip --yes
sudo systemctl start icc-dashboard icc-pollerRun the restore as the icc user so the restored files keep the right owner. The backup folder must be readable by that user.
Docker Compose
The data lives in the volume farwatch-data and the packs in farwatch-plugins. The key is in icc.env inside the data volume. From the folder that holds the compose file:
docker compose -f compose.yaml stop
docker compose -f compose.yaml run --rm web cli restore /data/backups/farwatch-backup-20261114-023000.zip --yes
docker compose -f compose.yaml startA zip kept outside the volume has to be mounted into the one-off container. On a new host, create the volumes, copy icc.env into farwatch-data first (or pass the old ENCRYPTION_KEY as an environment variable), then run the restore.
Backups on PostgreSQL
On PostgreSQL the same page, schedule, keep count and commands work, and no pg_dump binary is needed on the host. The zip carries one CSV per table instead of the database files, taken in one consistent read-only transaction across all the schemas. The folder needs room for about the size of the tables beside the zip.
Restore uses the same command with the services stopped. It refuses if another FarWatch session is open on the database. It writes a backup of the data about to be replaced into the backup folder and prints its path, then loads each CSV in one transaction. A failure rolls the load back and leaves the database as it was. A backup restores only onto the engine it came from. A SQLite zip on a PostgreSQL install, and the reverse, are refused. To move between engines use Global Settings > Database. See Starting on PostgreSQL.
The server's own patching, availability and at-rest encryption belong to your database team.
Recovery point and recovery time
The recovery point is the age of the newest backup. With the default daily schedule that is up to 24 hours of polled history. Accounts, settings and credentials changed in the same window are also lost. Run a manual backup before a planned change.
The recovery time is dominated by copying the databases back, plus verification of the zip, then a normal service start. Disk speed decides the answer, so measure your own restore on a spare host.
Warm standby
For a faster recovery, keep a second host with the same FarWatch version, the same ENCRYPTION_KEY and the services stopped. Copy each new backup to it and restore it on a schedule. To fail over, restore the newest backup, start the services and move the address or reverse proxy to the standby. FarWatch does not replicate in real time, so the standby is as current as its last restore.
What this does not cover
The backup covers the databases and the packs. It does not cover the .env file unless you ask, the reverse proxy or TLS certificates, or anything outside the install. The upgrade snapshot is a different thing: it copies the live state of the data folder once per upgrade. See Upgrades and rollback.
With SQLite, the database files themselves are not encrypted by FarWatch. Disk encryption on the server is the at-rest control. See Starting on PostgreSQL for the two tiers.