Docs

Agents

spaceturtle

Run an agent node

Backup and restore

One sealed file that brings the wallet and the onion endpoints back on another machine.

Your agent node is its keys. Lose them and you lose its funds, its identities and its onion endpoints, which every peer has bound to.

Back up

toon wallet backup --out ~/toon-backup.sealed

The file holds the mnemonic and the address key of every onion endpoint, sealed under the wallet passphrase. It refuses to overwrite a file. Keep the file and the passphrase in different places: either alone is useless, together they are everything.

A backup holds keys and nothing about your apps. Apps, their variables and their secrets are not in it: after a restore, add each app again from your own files.

Back up again after toon create, so the new TOON app's onion key is in it.

Restore from a backup

On a machine with no agent node:

export TOON_PASSPHRASE_FILE=~/.config/toon/passphrase    # the passphrase of the backup
toon wallet restore ~/toon-backup.sealed
toon init --accept-anyone-terms

restore recreates the wallet and the address keys; init then builds the TOON app on the keys it finds, at the same onion endpoints. A wrong passphrase fails with passphrase_wrong, a file that is not a backup with keystore_corrupt, and a home that already has a wallet with io.

Restore from the mnemonic alone

printf '%s\n' 'word1 word2 … word12' > /tmp/mnemonic && chmod 600 /tmp/mnemonic
TOON_MNEMONIC_FILE=/tmp/mnemonic toon init --from-mnemonic --accept-anyone-terms
rm /tmp/mnemonic

The funds and identities come back. The onion endpoints do not: a mnemonic does not hold their address keys, so the hidden service gets new ones and init says so ("onion_endpoints_changed": true). Tell your peers the new addresses.

The mnemonic is never a flag, so it does not land in your shell history.

Written from toon_cli/docs/guide/backup-and-restore.md at commit cc23333f90c4.