Documentation › Administration

Backups

Configuration › Backups keeps copies of everything needed to rebuild the Steward IT Census server:

In the backup Why it matters
The database (census.db) Assets, history, reports, settings, users. Copied consistently while the server keeps running.
secret.key Decrypts the stored scan credentials, SMTP/API keys and warranty credentials. A database without its key can't use any of them. When the key is bound to the TPM, the backup holds secret.key.bound (opens only on this computer) and, in password-protected backups only, also a copy of the key, so those restore anywhere.
tls.crt / tls.key The HTTPS certificate the Census agents trust. Restoring it means the agents keep reporting; without it every agent must be reinstalled.
acme/ The Let's Encrypt account and certificate, if you use one.
packages/ (optional) Uploaded installers for software deployment. Can be large; tick Include deployment package files to back them up.

Screenshots, downloaded vulnerability feeds and the agent installers in agents/ are left out: they are re-created or re-downloaded.

Schedule#

Backups are on by default: every day at 02:00, keeping the newest 7, in the backups folder of the data directory. Change the time, how many to keep, and the folder on the Backups page. A backup missed while the server was off is made at the next check (every 5 minutes).

Keep a copy away from the server. A backup on the same disk doesn't survive a disk failure or ransomware. Choose a folder on another disk or a mounted network share, or download backups regularly. On Windows the server runs as Local System: to write to a network share, give the server's computer account (DOMAIN\SERVER$) write access to it.

Back up now makes a backup immediately; Download and Delete manage existing ones. Only administrators can see this page.

Encryption#

Set an encryption password to encrypt backups (.zip.enc, AES-256 with a key derived from the password). Recommended for any copy that leaves the server, because a backup contains the secret key and therefore every stored credential. Write the password down: an encrypted backup can't be restored without it, and nobody can recover it.

Unencrypted backups are ordinary zip files.

Restoring#

Restore on the same or a newer version of Steward IT Census (a newer server upgrades the restored database on start; an older one refuses a backup from a newer version).

  1. Stop the server: census-server stop (Windows: an elevated command prompt in C:\Program Files\Steward IT Census).
  2. Restore: census-server restore census-backup-20261005-020000.zip (add -password "…" for an encrypted backup, and -data DIR if your data directory isn't the default).
  3. Start the server: census-server start.

The files the restore replaces are moved to a before-restore-<date> folder in the data directory; delete it once everything works.

Moving the server to another computer#

Install Steward IT Census on the new computer, stop its service, restore the backup there and start it. Point the agents' DNS name or IP address at the new server (agents connect to the address they were installed with). Because the certificate is restored, agents connecting by name keep working; agents installed with the old server's IP address need that address on the new server, or a reinstall. A license key belongs to the server it was issued for: send the new server's ID (Configuration › License) to Steward IT for a replacement key. The old key keeps working on the new server for 30 days meanwhile (see Licensing).

From the command line#

census-server backup makes a backup without the web interface (for example from a scheduled task), using the settings from the Backups page. Options: -out DIR, -password P, -packages.

PostgreSQL#

With a PostgreSQL database, the backup holds the keys, certificates and packages but not the database: back that up with pg_dump and restore it with psql/pg_restore before restoring the backup file.