Skip to content

Data and backup

Axocoatl has no backup or restore command. A reliable backup is a coordinated filesystem copy made while the daemon is stopped.

Axocoatl uses AXOCOATL_DATA_DIR when set. Otherwise, the normal installed product uses a user-level root independent of the current directory:

  • macOS: ~/Library/Application Support/Axocoatl/data
  • Linux/WSL: ${XDG_DATA_HOME:-$HOME/.local/share}/axocoatl

Its matching configuration is ~/Library/Application Support/Axocoatl/config.yaml on macOS or ${XDG_CONFIG_HOME:-$HOME/.config}/axocoatl/config.yaml on Linux/WSL.

An explicit project-local configuration uses a sibling data directory. For example, this command uses /absolute/path/to/data:

Terminal window
axocoatl dev --config /absolute/path/to/axocoatl.yaml

Set AXOCOATL_DATA_DIR only when that deterministic default is not the desired location.

An absolute data root outside every Workspace is easiest to reason about and back up. A project-local sibling data directory remains supported: local Podman masks it inside the Workspace container. A Workspace that is the data root, or lies below it, is rejected.

New roots use native Session storage with a format-ownership marker, canonical journals, and owned component directories for input/output evidence, activation state, grants, commands, approved teams, and retained Ways decisions. Preserve the whole root and its directory structure. A Session name or a copied journal alone does not establish ownership of its other stores.

Workspace knowledge includes accepted Markdown revisions, its publication manifest, proposals, and rebuildable source indexes. Include the complete store in the cold backup. A Markdown export is useful for portability but does not replace a full backup of revision history, receipts, and Session execution evidence. Do not edit stored immutable revision files directly; use the Knowledge inspector or an explicit Markdown import to create a validated revision.

Existing legacy roots are not silently converted. Shared and compatibility paths can include:

Current pathState
workspaces/*.jsonDurable Workspace ids, names, canonical paths, and activity timestamps
sessions/*.jsonWorkspace-owned, folder-anchored Session records
session-history/turns.v1.jsonlLegacy Session turn ledger
session-history/session-attachments.v1.jsonSession attachment relations and pins
checkpoints/v1/<agent-key>/<version>.ckptCurrent Agent conversation checkpoint caches
memory/daily_log/v1/<agent-key>/YYYY-MM-DD.jsonlCurrent dated activity records
memory/core/v1/agent_<agent-key>.jsonCurrent per-Agent core-memory blocks
memory/core/shared/v1/<block-key>.jsonCurrent shared core-memory blocks
memory/semantic/v1/agent_<agent-key>_semantic.jsonCurrent semantic records and vectors
models/Downloaded local embedding-model cache
local-api-tokenPer-daemon local API token (0600); a restore reuses it, deleting it issues a new one at the next start
local-api-token.issuedSHA-256 of the token 1.5.0 or later issued (0600); a token it does not name, one an earlier version created, is replaced once at the next start
loadout-runs/<run id>/Each loadout run: manifest.json, events.jsonl and outcome.json; kept when its Session is deleted
secrets/<name>Route credentials stored with axocoatl secret set (0600, not encrypted)
recipes/images.jsonImage ids recorded by axocoatl recipe build; a Session trusts exactly these recipe images
searxng/A managed SearXNG’s settings and secret (0600), with web_search.provider: searxng
automation/runs-v1/<automation-key>/<run-key>.jsonCurrent Automation run and node checkpoint records
automations.jsonCanonical Automation definitions
automation-folders.jsonSettings folder organization
mcp-permissions.jsonPersisted MCP allow/deny decisions
files/Immutable attachment bytes, extracted content, and compatibility file metadata
chats/Compatibility Chat API data
backups/before-segments/<key>/A copy of a Session taken before 1.3 first converted its journals; see Upgrade

Exact filenames may grow as stores are added. Back up the entire resolved root, not a hand-picked subset.

A 1.0 root may also retain exact pre-1.0 compatibility sources such as runs/, unversioned agent directories below checkpoints/ and memory/daily_log/, or unversioned core/semantic files. On supported Unix hosts, those locations are consulted only through bounded exact-name recovery. New writes use the current portable namespace, and recovery does not delete the legacy source. Include both current and retained legacy files by copying the entire root.

.axocoatl-daemon.lock/format.json records which Session format owns the root, and .axocoatl-daemon.lock.v1 is the file a daemon locks while it owns the root. Copy both with the rest of the root. The record also names the directory it was written in: its path and the identity of the directory and of that lock file. A copy of the root (a restored backup, Migration Assistant, Time Machine) is a new directory, and a moved root has a new path. From 1.5.0, the daemon records the new location when it starts on such a root, keeps the root’s ownership and every Session, and logs one warning that the data directory was copied or moved. It does so only after it holds every lock on the root, so it never shares a root with another daemon. A root copied while a Session storage upgrade (axocoatl session upgrade) was interrupted finishes that upgrade at its new location when the upgrade had not started converting a Session yet; a copy taken half-way through a Session’s conversion does not start, and axocoatl doctor says to finish the upgrade on the original data directory and copy that, or to restore a backup made before the upgrade. The per-root external lease lives in an owner-only operating-system temporary directory and is not backup data; the daemon creates it when it starts.

Attempts also create clones and manifests under .axo-variants/ inside the Workspace repository. The repository itself, its uncommitted working tree, and those temporary paths are outside the data root.

  1. Finish or deliberately clean up active Attempts. Record any unresolved recovery state.

  2. Stop Axocoatl using the method that matches how it is running. Press Ctrl-C in a foreground axocoatl dev or axocoatl serve terminal. For an installed service, run:

    Terminal window
    axocoatl service stop
  3. Confirm no Axocoatl process owns the runtime and do not edit the Workspace while copying.

  4. Copy the complete resolved data root, the active configuration, any secret-management metadata needed to recreate its process environment, and each Workspace repository to a versioned backup location.

  5. Preserve permissions and verify the copy can be listed and checksummed.

  6. Restart Axocoatl the same way it was started before the backup, then check status.

For an explicit advanced configuration, after substituting paths:

Terminal window
cp -a /absolute/path/to/axocoatl-data /backup/2026-08-17/axocoatl-data
cp -a /absolute/path/to/axocoatl.yaml /backup/2026-08-17/axocoatl.yaml
cp -a /absolute/path/to/workspace /backup/2026-08-17/workspace

There is no schema-aware restore command. A restore is the backup copied back, as one set, and started with Axocoatl 1.5.0 or later (see the caution above for earlier releases).

  1. Stop Axocoatl: axocoatl service stop for the service, or Ctrl-C in a foreground terminal.

  2. Move the current data root aside rather than deleting it, until the restore is verified. Copy the backup’s data root back to the path the daemon uses, and, when you restore them too, each Workspace repository back to its own path, keeping ownership and permissions:

    Terminal window
    mv /absolute/path/to/axocoatl-data /absolute/path/to/axocoatl-data.before-restore
    cp -a /backup/2026-08-17/axocoatl-data /absolute/path/to/axocoatl-data
    cp -a /backup/2026-08-17/axocoatl.yaml /absolute/path/to/axocoatl.yaml
    mv /absolute/path/to/workspace /absolute/path/to/workspace.before-restore
    cp -a /backup/2026-08-17/workspace /absolute/path/to/workspace

    The data root must be owned by the user who runs Axocoatl and must not be group or world writable.

  3. Restore the configuration and the process environment, then check them:

    Terminal window
    axocoatl validate /absolute/path/to/axocoatl.yaml
    axocoatl doctor --config /absolute/path/to/axocoatl.yaml

    For a restored copy, doctor’s Data dir ownership line says that the directory was copied or moved since its ownership was recorded and that the next start records its new location. A [FAIL] on that line means the daemon will not start on the directory; its hint says what to do.

  4. Start the daemon the way it ran before. Its log says once that the data directory was copied or moved and that its new location was recorded.

  5. Inspect Sessions, Automations, MCP permissions, and the Workspace Git state before resuming automatic triggers.

The same applies to a data root brought to a new Mac by Migration Assistant or Time Machine, or moved to another path: start 1.5.0 or later on it. Sessions keep working in repositories that are at the same paths as before. A repository now at another path is another Workspace for new runs; a Session made in the old path refuses work and names that folder until you move the repository back or delete the Session.

A data root moved to another volume is copied, then the original deleted. Its Sessions’ Podman volumes carry the original’s runtime authority, which a copy never takes for its own, as the original may still run. Once the original is deleted, run axocoatl session record-location --original-deleted (with the same --config) while Axocoatl is stopped; the next start then removes those volumes as its own when their Sessions are closed or deleted. axocoatl doctor says when a copy has such volumes.

If an installed service keeps restarting, axocoatl service status shows the line its last failed start logged.

Deletion does not currently promise immediate garbage collection of every content-addressed attachment blob. Do not use Session deletion or rewind as a secure-erasure procedure.

Next: Upgrade →