Database Restore & Recovery

A backup is only useful if you can put it back. This page is the companion to Database Backup & Maintenance: it walks through restoring the Athena database from one of your backup files and how to confirm the server is healthy afterwards.

Restore is an offline, whole-database operation

Restoring replaces the entire live database with the contents of the backup — every agent, deployment, command, compliance record, user, and audit entry reverts to the moment the backup was taken. There is no merge. Always take a fresh backup of the current database first so you can roll the restore back if you picked the wrong file.

When you would restore#

Before you start#

Restoring on the appliance#

Restore from a backup with the in-app database backup/restore. For a restore on the appliance itself, contact support@sealgrid.ai.

Restore the Root CA too, or re-enroll the fleet

The database holds your configuration and records, but agent trust is anchored by the Root CA, which is kept outside the database. To recover a working server that your existing agents keep trusting, restore both the database and the PKI data from the old server. On the appliance these live in /data/athena and /data/pki — back up /data/athena and /data/pki together. If the CA is lost, a fresh one is generated and agents must be re-enrolled — see Certificates & PKI and Data Directories & Backup for what to preserve.

Verifying the restore#

After the server restarts, confirm it came up cleanly on the restored data before you consider the recovery complete:

  1. Health check. The appliance runs its own health check against /health, including the database probe; its state shows on the VM console status screen and under Settings → Appliance → Overview. For detail, an Admin can open the authenticated health report — see Server Health & Monitoring — and confirm the Database component is healthy.
  2. Sign in and spot-check. Log in to the console and confirm the data reflects the backup's point in time — the agent count, recent deployments, users, and roles.
  3. Watch agents reconnect. Agents reconnect on their next heartbeat and resume reporting; see Agent Status & Health.
  4. Review the audit trail. Restored data starts at the backup's timestamp — any changes made after that backup are not present. Check the audit trail to understand the gap.
# Liveness
curl -k https://athena.example.com:8443/health

# Detailed health (Admin bearer token) — confirms the Database component
curl -k -H "Authorization: Bearer <token>" \
  https://athena.example.com:8443/api/health/details

Things to keep in mind#

ConsiderationWhat to expect
Data loss windowEverything created or changed after the backup timestamp is gone. Restore the newest good backup to minimize the gap, and back up often — see scheduled backups.
Schema versionMigrations run automatically on start, so a backup from an older build is upgraded to the running server's schema. Restoring onto an older server than the one that wrote the backup is not supported.
Bulk file storageThe database does not contain uploaded packages, agent binaries, helper binaries, or session recordings — those are stored separately. Restore them alongside the database if you need a complete point-in-time recovery (Data Directories & Backup).
Root CA & certificatesAgent trust depends on the Root CA in the PKI directory, not the database. Preserve and restore it to avoid re-enrolling agents (Certificates & PKI).
Server TLS certificateIf you restore onto a new appliance, its server TLS certificate is separate from the database. Re-supply your own certificate or let the server regenerate one (Server TLS Certificate).