Skip to content
Skip to content

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 backup and agentop restore.
  • Control center (agentop): the Backup tab; the b key runs a backup.
  • Web: Settings → Backup.

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 login or agentop 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.
Janela do terminal
agentop backup # metrics + repositories
agentop backup --plan # shows what would be written, writes nothing
agentop backup --with-archive # includes the mirrored transcripts
agentop backup --with-raw # includes the harness folders
agentop backup --dest ~/my-backups
  • The file goes to ~/.agentistics/backups/ (or the --dest folder), as .tar.zst when the machine’s tar supports 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 status shows the last backup and the schedule.

Off until you turn them on; an update never turns them on.

Janela do terminal
agentop backup schedule daily --at 9 # every day at 9
agentop backup schedule weekly # once a week
agentop backup schedule custom 8 --at 9 # every 8 hours, from 9
agentop backup schedule daily --days mon,wed,fri
agentop 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 repos layer; only a manual one does.
  • The schedule only runs while agentop server is up.

On the web the same lives in Settings → Backup: Recurrence, At what time, On which days and What a scheduled run carries.

Optional. Each backup becomes a release in a private repository of yours.

Janela do terminal
agentop backup github setup https://github.com/you/my-backups
agentop 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).
Janela do terminal
agentop restore ~/.agentistics/backups/<file> # metrics and preferences
agentop restore ~/.agentistics/backups/<file> --repos # also rebuilds the repositories
agentop restore <file> --repos --only my-shop # just one repository

On a new machine, straight from GitHub:

Janela do terminal
agentop restore github --list https://github.com/you/my-backups # lists the versions
agentop restore https://github.com/you/my-backups # downloads and restores the latest
agentop 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.