Skip to content

Operations

Backup in short

LiMDM backs up database, CA directory (with keys.json and the audit key files) and local uploads itself: on configurable schedules, after every key rotation and before package upgrades, encrypted with age, signed with the command key, to local, S3 (with Object Lock), Backblaze B2, SFTP or WebDAV targets, with retention rules per schedule, weekly checksum verification and restore tests. Set it up under Settings, Backup; the full description is Backup.

What In the archive Why
PostgreSQL database yes (COPY export of one snapshot) devices, configuration, audit log, sealed secrets, webhook signing secret
CA directory yes device and network CA, command key, keys.json, audit-keys, audit-keyed-from. Without it no device can check in and the audit log cannot be verified
Uploaded packages in LIMDM_ARTIFACT_DIR yes Package repository; uploads in S3 stay in their bucket (enable versioning)
LIMDM_SESSION_KEY no keep it apart from the archives (password safe); without it sealed secrets and recovery keys are unreadable
age private key no offline, never on the server

With LIMDM_KEY_PROVIDER=pkcs11 the private keys are in the HSM: back up the token as its vendor describes; the archive holds the certificates and key files. For point in time recovery, RPO and RTO guidance see Backup; a pg_dump -Fc next to the built in backup does no harm.

Key rotation in short

limdm-server keys status|rotate KIND|finish KIND and Settings, Security, Keys rotate the device CA, the network CA, the command key, the session key and the webhook signing secret without enrolling devices again. Each step takes effect after a restart of every instance. Agents must run 0.16 or newer. Runbooks: Keys and HSM.

Restore in short

limdm-server backup restore restores an archive into an empty database and CA directory (Restore an archive):

  1. Install the same or a newer server version; keep the agent port closed.
  2. Set LIMDM_SESSION_KEY of the backup and a new, empty LIMDM_DATABASE_URL.
  3. limdm-server backup verify, then limdm-server backup restore -identity KEY -command-key HEX -replay AUDIT_AFTER_BACKUP FILE.
  4. Start one instance, check /readyz and the audit chain, then open the agent port.

Devices keep checking in without enrolling again, with these limits:

  • A device that renewed its certificate after the backup presents a certificate the restored database does not know. During the restore window (default 7 days) the server accepts a certificate of its own device CA issued after the backup once and pins it (device.cert_repin audit entry). After the window such a device must enroll again.
  • A device enrolled after the backup is unknown and must enroll again.
  • Retirements, deletions and token revocations after the backup are undone by the restore. -replay applies them again from the syslog copy or an audit export; without such a copy retire lost devices by hand.
  • Other changes after the backup (console users, roles, settings, library, blueprints) are listed by restore for a manual review.

Several instances

Run several server instances behind a load balancer for availability: High availability.