Skip to content

State, backup, and restore

Ódinn’s configured state directory is the durable center of the installation. It contains configuration, memory, sessions, goals, jobs, audit history, the run ledger, provider OAuth material, the browser profile, and recovery records.

Treat the entire directory as private.

Choose a secure directory outside the active state root:

Terminal window
odinn state backup --output /secure/path/odinn-backup

Keep backups on storage with access controls appropriate for credentials and browser sessions. Do not upload them to public issue trackers or general-purpose file-sharing links.

Stop the gateway before restoring:

Terminal window
odinn state restore \
--input /secure/path/odinn-backup \
--confirm

Restore validates the input and replaces state deliberately. Symlinks, hardlinks, and special files are rejected before copying.

After restoration:

Terminal window
odinn doctor
odinn audit verify
odinn onboard --verify --non-interactive

The installer keeps immutable version directories and current/previous pointers. Application rollback is separate from state restore:

Terminal window
node scripts/install.ts status --prefix "$HOME/.local/share/odinn"
node scripts/install.ts rollback --prefix "$HOME/.local/share/odinn"

Use installer rollback when a new application version fails. Use state restore when durable local data or configuration must return to a known backup.

  • Back up before upgrades, resets, or risky policy changes.
  • Test that a backup can be read and restored.
  • Keep at least one copy off the active machine.
  • Record the Ódinn version associated with the backup.
  • Never edit signed audit files by hand to “repair” them.

See State layout for the stores that make up a state directory.