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;
- staged captures, consolidation batches, and memory review state;
- 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.
Workspace GitHub backup
Team OS can also back up files written under AGENTIC_OS_DIR to a private
GitHub repo. Configure it on the API service with TEAM_OS_GITHUB_BACKUP_REMOTE
and TEAM_OS_GITHUB_BACKUP_TOKEN.
This protects server-side workspace files, such as shared context and granted
client text files. It does not protect the Postgres database. It also excludes
secrets, runtime state, transcripts, build output, and backups/.
Use both backups in production:
- Postgres backup for memory, auth, teams, grants, and audit data.
- GitHub workspace backup for server-side workspace files.
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 --yesNext: Host Team OS
