Backup & Restore
Anyy backup captures a coherent Profile snapshot. Restore always publishes into a new, nonexistent Profile directory; it never overlays live data.
Create a Backup
anyy backup create
The default archive is written under the Profile's backup area with a timestamped name. Choose another destination when needed:
anyy backup create --output /secure/path/anyy-backup.tar.gz
If the Gateway is reachable, the command asks the resident runtime to create the coherent snapshot. If it is offline, Anyy must acquire exclusive Profile ownership before reading mutable state.
What Is Included
The archive can include the Profile configuration, Role and Skill files, workspace and memory data, schedules, channel configuration, a database snapshot, and referenced durable objects or artifacts.
Temporary runtime files are excluded. Symlinks are refused instead of following content outside the Profile.
Secrets Are Excluded by Default
anyy backup create --include-secrets
This adds Profile secrets and supported MCP/OAuth material.
Encrypt it, restrict access, and do not upload it to ordinary file sharing or an issue tracker. Prefer a normal backup when credentials can be reconnected later.
List Backups
anyy backup list
anyy backup list --json
The list command reports recognized archives in the Profile's backup location. An archive at a custom path can still be restored by specifying it directly.
Restore Safely
Choose a target directory that does not exist:
anyy backup restore \
--archive /secure/path/anyy-backup.tar.gz \
--target-home /path/to/new-profile
Before publishing the target, restore validates the manifest, file hashes, available space, paths, and archive structure. It stages the result beside the target, rebuilds required indices and audit state, then publishes atomically.
After restore:
anyy status --home /path/to/new-profile
anyy doctor --home /path/to/new-profile
Then register or select the restored directory as a Profile using your normal Profile workflow.
Recovery Rules
- Never choose the current Profile home as
--target-home. - Never restore over a directory that already exists.
- Keep the source archive until the restored Profile passes
statusanddoctor. - Reconnect omitted credentials before enabling outbound channels or paid providers.
- Test a restore periodically; an untested archive is only a backup attempt.
Troubleshooting
| Symptom | Explanation |
|---|---|
| Backup refuses offline mode | A live process still owns the Profile; use the resident path or stop it |
| Restore says target exists | Pick a new empty path; overlay restore is intentionally unsupported |
| Hash or manifest validation fails | Do not bypass it; use another known-good archive |
| Restored providers cannot authenticate | The source backup probably excluded secrets; reconnect credentials |