Back up or move a box
You can export a persistent box and its snapshots, then recover it on a host with the same CPU architecture. Set $box to your task's handle from raft list. Use a stopped source; stopping a disposable box deletes it, so copy files out of those boxes instead.
Archives include credentials, keys, shell history and unsanitized instance configuration. Import only trusted Raft backups. Store them privately on encrypted storage off the source host; snapshots alone do not protect against host loss.
Export a private archive
Choose a destination that does not exist, with an existing parent, enough free space, and support for private permissions and hardlinks:
raft stop "$box"
raft backup "$box" ./project-backup.tar.gzRaft exports the whole filesystem, metadata and snapshots, then publishes the completed archive with mode 0600 without replacing another file. Hardlink support is checked at publication, so an export may finish before that check fails. A long export delays host expiry checks for other boxes.
Recover and check your work
Use lab for same-host recovery or another configured location of matching architecture. An own-disk backup needs own disks enabled on the target and reservation space for the box and every included snapshot:
recovered=$(raft recover ./project-backup.tar.gz --location lab --purpose "Recovered project" --owner "Local operator" --next "Verify files before removing source")
raft info "$recovered"
raft resume "$recovered" --ttl 1800
raft exec "$recovered" -- ls -la /workspaceRecovery creates a persistent, stopped box with a fresh name and MAC address and no inherited TTL. It keeps the original disk type and own-disk size. Host retention starts when the worker first observes it stopped, so resume or back it up before that deadline.
Without note flags, recovery keeps the archived note. Flags replace the whole note. A supplied note is checked before upload; an inherited note that fails host policy causes the imported box to be deleted. See note policies.
Check your application, files and snapshots before deleting the source or archive. Once verified, you may permanently delete only the old source with raft destroy "$box". Keep an off-host backup.
Handle an interrupted recovery
Recovery prints its allocated handle to stderr before import. If SSH drops or the host crashes, inspect that exact handle and the target inventory before retrying. A missing response does not prove the import failed.
For an abandoned /tmp/raft-recovery.XXXXXXXX host staging file, follow recovery troubleshooting. Never delete staging files by wildcard or remove another operation's files.