Skip to content

Backup and recovery with several instances

Backup

What How Notes
Database continuous archiving with point in time recovery (pgBackRest, WAL-G, Barman, or the managed service's backups), plus the built in daily backup (Backup) PITR gives an RPO of seconds to minutes
CA directory in every built in backup; it runs again after every key rotation step identical on all instances
LIMDM_SESSION_KEY with the CA directory, apart from the database backups
LIMDM_RELEASE_DIR not needed downloaded again

RTO and RPO

Failure Effect Recovery time Data loss
One server instance load balancer removes it after the health checks; its remote shells end; its background jobs move within 15 s seconds none
PostgreSQL primary, HA failover requests fail during the failover, then continue failover time (30 to 120 s) none with synchronous replication, otherwise the last seconds
Whole database lost, restore from PITR all instances unready until restored restore time: plan about 1 hour per 100 GB plus WAL replay; measure it up to the last archived WAL segment (archive_timeout, for example 60 s)
Restore from the nightly dump only as above dump size dependent up to 24 hours
CA directory lost without backup devices cannot be verified: every device must enroll again days device identities

Devices tolerate outages: they keep their declarations, check in again when the server is back. Only devices with offline_lock_hours in com.limdm.agent lock themselves after that time without server contact, so keep it well above your RTO.

Restore test

limdm-server backup restore-test restores an archive into a scratch database, verifies the audit chain and the sealed values and records the result; run it monthly (Restore test). In addition, practice a full restore at least twice a year and after major changes, on a separate host:

  1. Restore the CA directory and LIMDM_SESSION_KEY to a test host; set a different LIMDM_PUBLIC_URL, keep LIMDM_AGENT_URL unreachable for devices.
  2. Restore the database (PITR to a recent time, or limdm-server backup restore into an empty database).
  3. Start one instance and check /readyz.
  4. Sign in, open Audit, run Verify whole chain: it must report the chain intact.
  5. Open a device and an item; open a recovery key of a test device (sealed secrets readable).
  6. Note the time taken (RTO) and the newest audit entry against the time of the failure simulation (RPO), and record the test in the audit log or your ISMS.
  7. Destroy the test host and its copies of the keys.