Skip to main content

Backup & Restore

Aegis Memory stores everything in PostgreSQL, so your database backup is your source of truth. Aegis also provides a logical export for portable, human-readable snapshots.
The open-source distribution has no managed or automated backup. Backups are your responsibility — schedule them with your own tooling (cron, your cloud provider’s managed backups, etc.).
A full pg_dump captures memories, embeddings and all metadata exactly, and restores to a byte-identical state.
After restoring to a new database, ensure the pgvector extension exists and run alembic upgrade head if the target is on a newer Aegis version (see Migrations).

Option 2 — Logical export (portable snapshots)

Use the export endpoint / CLI for a portable JSON or JSONL snapshot — useful for migrating between environments or archiving a namespace.
The export endpoint is POST /memories/export (format = jsonl or json, optional include_embeddings). Re-embedding on import is automatic when embeddings are not included.
A logical export is not a substitute for a database backup for disaster recovery: depending on options it may omit embeddings (recomputed on import) and does not capture every server-side column. Use pg_dump for authoritative recovery and exports for portability.

Verify your backups

  • Periodically restore a backup into a scratch database and start the API against it.
  • Confirm a sample query returns expected results.
  • Keep backups encrypted at rest and access-controlled.