Documentation Index
Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
Use this file to discover all available pages before exploring further.
Backup and Restore Platform Data
This guide covers backup and restore procedures for all stateful components of CRAFT. Each service owns its own database, and infrastructure services (Keycloak, OpenFGA, Infisical) maintain independent state that must be backed up separately.Stateful Components
The platform has the following stateful components that require backup:| Component | Storage | Data |
|---|---|---|
| Governance DB | PostgreSQL | Organizations, projects, users, role assignments |
| Assets DB | PostgreSQL | Artifacts, data connections, files, models |
| Utils DB | PostgreSQL | Data catalog, scheduling, context packs, memories |
| Keycloak | PostgreSQL | Realms, users, IdP configurations, sessions |
| OpenFGA | PostgreSQL | Authorization model, relationship tuples |
| Infisical | Internal store | Application secrets, data connection credentials |
| Redis | In-memory + AOF | Cache, session state, event streams |
| Solution DBs | PostgreSQL | Data Insights sessions, Data Governance profiles |
PostgreSQL Backup
Automated Backups (Cloud-Managed)
For cloud-managed PostgreSQL (Cloud SQL, RDS, Azure Database):- GCP Cloud SQL
- AWS RDS
- Azure
Cloud SQL provides automated daily backups with configurable retention.
Manual Backups (On-Premises)
For self-managed PostgreSQL deployments:Point-in-Time Recovery
For production deployments, enable WAL archiving for point-in-time recovery:Keycloak Backup
Keycloak state is primarily stored in its PostgreSQL database, but realm configuration can also be exported as JSON for version control.Realm exports include user accounts but not user credentials (passwords). Users will need to reset passwords after a realm import. SSO users are unaffected since their credentials are managed by the external IdP.
OpenFGA Backup
OpenFGA stores its authorization model and relationship tuples in PostgreSQL. The database backup covers all OpenFGA state. For additional safety, export the authorization model:Secrets Backend Backup
The platform supports two secrets backends. Back up whichever you are using.- Infisical
- ESO + GCP Secret Manager
Infisical manages application secrets including data connection credentials. Back up the Infisical database (PostgreSQL
infisical database) and preserve the encryption keys.Redis Backup
Redis serves as a cache and event stream. While cache data is ephemeral, you may want to back up Redis for faster recovery:Restore Procedures
Restore PostgreSQL Databases
Restore Keycloak Realms
Restore from Cloud Managed Backups
- GCP Cloud SQL
- AWS RDS
Backup Schedule Recommendations
| Component | Frequency | Retention | Method |
|---|---|---|---|
| PostgreSQL (all DBs) | Daily + continuous WAL | 30 days | Cloud-managed or pg_dump |
| Keycloak realm exports | Weekly | 90 days | JSON export |
| OpenFGA model | On change | Indefinite | JSON export in version control |
| Redis | Daily | 7 days | RDB snapshot |
| Secrets backend (Infisical) | Daily | 30 days | Database backup with encryption keys |
| Secrets backend (GCP SM) | N/A, managed | Indefinite | GCP retains all versions; document IAM bindings in Terraform |
Disaster Recovery Checklist
Restore PostgreSQL databases
Restore all platform databases from the latest backup. Verify row counts and data integrity.
Restore Keycloak
Import realm configurations. SSO users will re-authenticate via their IdP. Local users may need password resets.
Verify OpenFGA schema
Confirm the authorization model is loaded. The Governance service re-applies the schema on startup.
Restore secrets backend
Infisical: Restore the Infisical database and encryption keys. Verify data connection credentials are accessible. ESO + GCP Secret Manager: Verify GCP Secret Manager secrets are intact and ESO ClusterSecretStore can authenticate via Workload Identity.
Restart platform services
Follow the startup order: PostgreSQL -> Redis -> Keycloak -> OpenFGA -> Governance -> Assets/Utils -> Solutions.
Next Steps
Deployment Overview
Review the full deployment architecture and infrastructure requirements.
Helm Configuration
Configure Helm values for backup-related settings.
GDPR Compliance
Understand data retention requirements for GDPR compliance.
Network Security
Secure backup data in transit and at rest.

