Skip to content
Docs

Backup and Disaster Recovery

Encrypted .agwbak archives (AES-256-GCM + PBKDF2). 40 core DB tables (organizations, users, tenants, providers, models, usage, DLP/audit, settings, billing, …) + /data/ file tree. SSO/LDAP/SCIM provider configuration, A2A and Tier-1 tables are not included — re-export or re-configure them separately. gzip/TAR. Max 10 stored. APIs: create, status, list, download, restore. Cross-system portable (shared AGENTWATCH_BACKUP_SECRET; unset → a built-in key, so backups restore anywhere but are not confidential). Before 2.0.412 the variable was not read and every backup used the built-in key; those still restore. Without ENCRYPTION_KEY the encryption key is a row in system_settings, so a backup carries its own key — set AGENTWATCH_BACKUP_SECRET.

RPO / RTO: backups can be scheduled (cron) or triggered on-demand; RPO is bounded by the schedule cadence (default hourly snapshot recommended for production). RTO is dominated by archive download + restore time — typically minutes for SQLite, low single-digit hours for PostgreSQL multi-GB datasets. For tighter targets, run an HA PostgreSQL primary/replica behind AgentWatch and rely on the database tier’s replication + PITR (point-in-time-recovery) rather than the .agwbak snapshot.

Multi-region failover: stateless application instances behind HAProxy or a global load balancer (Route 53, Azure Traffic Manager, Cloud DNS); shared PostgreSQL with cross-region read replicas; Redis with multi-AZ replication. The application tier supports active/active across regions; failover is automatic at the LB layer.

Configuration rollback: the encrypted backup is the system-of-record for full state rollback. Gateway routes support JSON import/export, and /admin/config/export covers tenants and providers; guardrail policies have versioning + rollback (/api/admin/guardrails/versions).

Zero-downtime upgrades: rolling deploys behind HAProxy — drain → upgrade → re-add. Schema migrations are forward-only with self-healing backfills (Section 8).