Backup and restore
Team OS hosted memory lives in Postgres. Back up the database, not only the API
Team OS hosted memory lives in Postgres. Back up the database, not only the API container.
Database backups protect:
- memory sources and chunks;
- embeddings;
- index jobs;
- search audit events;
- teams, users, clients, grants, and auth data stored in the hosted database.
They do not replace secret management. Keep database passwords, API tokens, and auth secrets in a secure store.
Back up hosted Postgres
Run this from command-centre with a hosted database URL:
MEMORY_DATABASE_URL='postgres://postgres:<password>@<host>:5432/agentic_memory' \
npm run memory:backupBackups are written under backups/memory/ by default. Copy them away from the
database host.
Restore hosted Postgres
Restore into a fresh pgvector database:
MEMORY_DATABASE_URL='postgres://postgres:<password>@<host>:5432/agentic_memory' \
npm run memory:restore -- backups/memory/<backup-file>.dump --yesUse a pgvector/pgvector target database. A plain Postgres database does not
include the vector extension required by memory embeddings.
Verify after restore
After restore:
- Start the Team OS API.
- Open
/v1/health. - Confirm
backendispostgres. - Sign in with a Team OS user.
- Run a small memory search or check memory status.
Local memory backups
When no MEMORY_DATABASE_URL is set, the same backup command protects local
PGLite memory instead.
npm run memory:backup
npm run memory:restore -- backups/memory/<backup-file>.tar.gz --yes