Backup and restore
A backup keeps your metrics history, your preferences and, if you want, everything needed to rebuild your repositories on a new machine. There are three doors to the same backup:
- Terminal:
agentop backupandagentop restore. - Control center (
agentop): the Backup tab; thebkey runs a backup. - Web: Settings → Backup.
What goes in
Section titled “What goes in”A backup is made of layers:
| Layer | What it carries | Default |
|---|---|---|
metrics |
Each session’s metrics, the stats caches and your preferences | always (can’t be turned off) |
repos |
A manifest that rebuilds each repository: the remote, each worktree’s commit, branches never pushed, uncommitted changes and the list of untracked files | on |
archive |
Mirrored transcripts (exists only with history in full mode) |
off (--with-archive) |
raw |
The harnesses’ own folders (~/.claude, ~/.codex…) |
off (--with-raw) |
Left out on purpose:
- Secrets and logins in the clear. The Vault goes only as an encrypted copy that opens with your 24
words (see Vault and secrets). After a restore, agentistics lists each missing credential and the command that
brings it back (for example
claude login,codex loginoragentop backup github setup <url>). - Caches and logs, which rebuild themselves.
- Machine state (such as which tmux sessions are open), which would be wrong on a new machine.
Run a backup
Section titled “Run a backup”agentop backup # metrics + repositoriesagentop backup --plan # shows what would be written, writes nothingagentop backup --with-archive # includes the mirrored transcriptsagentop backup --with-raw # includes the harness foldersagentop backup --dest ~/my-backups- The file goes to
~/.agentistics/backups/(or the--destfolder), as.tar.zstwhen the machine’starsupports it, otherwise.tar.gz. - A repository over the limit (
--max-bundle, 200 MB by default) is named in the output; nothing is silently cut. agentop backup statusshows the last backup and the schedule.
Automatic backups
Section titled “Automatic backups”Off until you turn them on; an update never turns them on.
agentop backup schedule daily --at 9 # every day at 9agentop backup schedule weekly # once a weekagentop backup schedule custom 8 --at 9 # every 8 hours, from 9agentop backup schedule daily --days mon,wed,friagentop backup schedule off- Times are fixed: every 8 h from 9 gives 9, 17 and 1.
- If the machine was off, at most one late backup runs, and only if the next one is more than 2 hours away.
- A scheduled backup does not carry the
reposlayer; only a manual one does. - The schedule only runs while
agentop serveris up.
On the web the same lives in Settings → Backup: Recurrence, At what time, On which days and What a scheduled run carries.
Versions in a private GitHub repository
Section titled “Versions in a private GitHub repository”Optional. Each backup becomes a release in a private repository of yours.
agentop backup github setup https://github.com/you/my-backupsagentop backup github status- Setup asks for a token (hidden as you type) and checks, before saving anything, that the repository is private and that the token can push to it.
- Keeps the 7 most recent backups by default (How many backups to keep on GitHub).
Restore
Section titled “Restore”agentop restore ~/.agentistics/backups/<file> # metrics and preferencesagentop restore ~/.agentistics/backups/<file> --repos # also rebuilds the repositoriesagentop restore <file> --repos --only my-shop # just one repositoryOn a new machine, straight from GitHub:
agentop restore github --list https://github.com/you/my-backups # lists the versionsagentop restore https://github.com/you/my-backups # downloads and restores the latestagentop restore https://github.com/you/my-backups --release <tag> --from <machine>- Restore asks for confirmation, shows what it will download and checks the file before touching anything.
- If several machines back up to the same repository, name one with
--from <machine>. - An interrupted restore picks up where it stopped. Each failure shows on one line, with the item and the reason.