Backups and restore
Everything Vocion knows is in two places: Postgres (records, conversations, runs, credentials, the durable executor's state) and your workspace git repo (agents, skills, rules). Media and artifact files are the third, smaller piece.
| What | Where | Back it up by |
|---|---|---|
| Database | Postgres (DATABASE_URL) | Snapshots / point-in-time recovery, or pg_dump |
| Workspace definitions | Your workspace git repo | Git; re-apply with workspace:apply |
| Uploaded media | S3 bucket (VOCION_MEDIA_BUCKET) | Bucket versioning |
| Artifact files | VOCION_ARTIFACTS_DIR | Volume snapshots |
| Credential vault key | KMS key, or VOCION_CREDENTIAL_VAULT_KEY | Keep it: without it, stored credentials can't be decrypted |
With vocion-stack
- RDS automated backups with point-in-time recovery for
db_backup_retention_days(7). - AWS Backup: a daily backup (
cron(0 3 * * ? *)) into a vault encrypted under the module's data key, keptbackup_retention_days(35), locked in governance mode so no recovery point is deleted early. - Cross-account copy (
backup_copy_vault_arn) sends each backup to a vault in another account, once cross-account backup is on for your AWS organization and the destination accepts it. - The media bucket is versioned. The host holds no data: replacing it loses nothing.
On the older single-host path
infra/aws takes daily EBS snapshots kept seven days. Add a nightly pg_dump to S3 for anything you can't afford to lose.
Restore
- Restore the database to a new instance (RDS point-in-time restore or an AWS Backup recovery point), or
psqla dump into an empty database withvectorenabled. - Point
DATABASE_URLat it and deploy the same release that wrote the backup. - Make sure the same vault key is available (
VOCION_KMS_KEY_ARNorVOCION_CREDENTIAL_VAULT_KEY). - If the workspace files moved on since, re-apply them.
Test a restore before you need one.