Skip to main content
Version: v4

Back up and restore

Losing the agent's state loses its keys, its DID and every accreditation bound to it. Treat backups as part of the deployment, not an afterthought.

What to back up​

StateWhereContains
Wallet and recordsPostgreSQLkeys, credentials, connections, flows, exchanges
Agent data directorythe /root/.afj volumeDID log, tails files, local state
Configuration.env or Helm values and Secretsthe mnemonic above all

Redis holds queues and caches and needs no backup.

How​

  • PostgreSQL: pg_dump on a schedule, or your provider's managed backups, encrypted at rest.
  • The volume: snapshot it with your platform (CSI snapshots on Kubernetes, provider snapshots for a VM), at the same cadence.
  • Secrets: in your secret manager, with the mnemonic also in offline custody.

Restore​

Restore the database and the volume into a fresh deployment with the same PUBLIC_API_BASE_URL, the same mnemonic and the same corporation id. The agent loads the persisted DID and resumes. Prove it once in a staging namespace before you need it: readiness 200, info returns the same DID, resolve returns trusted.

Next​