Backup & Recovery
Each data store has different backup characteristics based on its persistence model and data criticality.
PostgreSQL Backups
PostgreSQL holds the most critical data: organizations, users, entity definitions, agent configurations, and workflow state.
Full Backup
# Connect to the PostgreSQL pod or LoadBalancer
kubectl port-forward -n eloquent statefulset/postgresql 5432:5432
# Backup all databases
pg_dumpall -h localhost -U eloquent > full_backup.sql
Per-Organization Backup
Since each organization uses dedicated schemas, you can backup a single organization's data. Contact the Eloquent team for the specific schema names to target.
Restore
psql -h localhost -U eloquent < full_backup.sql
ClickHouse Backups
ClickHouse stores knowledge graph data and analytics. Each organization has its own dedicated database.
# Connect via LoadBalancer or port-forward
kubectl port-forward -n eloquent statefulset/clickhouse 9000:9000
# Use clickhouse-client to export/import data
Contact the Eloquent team for organization-specific backup procedures.
Message Queue
The message queue stores chat messages and agent context with automatic TTL-based expiration:
| Data Type | Retention | Recovery Notes |
|---|---|---|
| Chat messages | 10 days | Auto-expires; no backup needed unless archival is required |
| Agent context | 30 days | Auto-expires; regenerated on next conversation |
| Statistics | 10 days | Ephemeral metrics data |
Message queue data is designed to be ephemeral. For long-term chat retention, the platform can archive chat data to ClickHouse before expiry.
Redis
Redis stores cache and session data. It is fully ephemeral — no backup is needed.
- Cache entries are recreated on demand
- Sessions are re-established on user login
If Redis data is lost, the only user impact is that active sessions are invalidated (users must re-login).
Deployment Rollback
Rolling Back a Service
# Rollback to the previous version
kubectl rollout undo deployment/<service-name> -n eloquent
# Rollback to a specific revision
kubectl rollout history deployment/<service-name> -n eloquent
kubectl rollout undo deployment/<service-name> -n eloquent --to-revision=3
Rolling Back the Entire Platform
# Rollback Helm release
helm rollback eloquent <revision-number> -n eloquent
# Check release history
helm history eloquent -n eloquent
Organization Deletion
When an organization is deleted, all associated data is permanently removed across all data stores — PostgreSQL schemas, ClickHouse databases, message queue storage, and Redis cache.
This is a cascading, irreversible operation. Back up the organization's data before deletion if needed.
Recommended Backup Schedule
| Component | Frequency | Method |
|---|---|---|
| PostgreSQL | Daily | pg_dumpall or cloud-managed snapshots |
| ClickHouse | Daily | Table exports or volume snapshots |
| Message Queue | Not required | Ephemeral with TTL |
| Redis | Not required | Ephemeral cache |
| Kubernetes | Weekly | Cluster state backup (Velero) |
| Helm values | Always | Version-controlled (excluding secrets) |