Skip to navigation

Transfer State Manually

View as Markdown

Use manual transfer when you need to inspect or move specific state files. OpenShell preserves the native home/workspace during routine lifecycle operations, and NemoClaw transfers the complete tree during rebuild. Use manual transfer for an independent backup or a targeted cross-sandbox move.

Download State

Use nemoclaw <name> download to copy files from the sandbox to your host. The wrapper rejects a directory that contains a symbolic link or another special file before it invokes the OpenShell download or creates the host destination.

SANDBOX=my-assistant
BACKUP_DIR=~/.nemoclaw/backups/$(date +%Y%m%d-%H%M%S)
mkdir -p "$BACKUP_DIR"
nemoclaw "$SANDBOX" download /sandbox/.openclaw/workspace/SOUL.md "$BACKUP_DIR/"
nemoclaw "$SANDBOX" download /sandbox/.openclaw/workspace/USER.md "$BACKUP_DIR/"
nemoclaw "$SANDBOX" download /sandbox/.openclaw/workspace/IDENTITY.md "$BACKUP_DIR/"
nemoclaw "$SANDBOX" download /sandbox/.openclaw/workspace/AGENTS.md "$BACKUP_DIR/"
nemoclaw "$SANDBOX" download /sandbox/.openclaw/workspace/TOOLS.md "$BACKUP_DIR/"
nemoclaw "$SANDBOX" download /sandbox/.openclaw/workspace/HEARTBEAT.md "$BACKUP_DIR/"

OpenClaw creates MEMORY.md and memory/ only after it stores memory. Run each applicable command only when that sandbox path exists:

nemoclaw "$SANDBOX" download /sandbox/.openclaw/workspace/MEMORY.md "$BACKUP_DIR/"
nemoclaw "$SANDBOX" download /sandbox/.openclaw/workspace/memory/ "$BACKUP_DIR/memory/"

The same directory also holds POLICY.md. NemoClaw writes that file during the onboarding policy step and refreshes it when you add or remove a network-policy preset. Download it for reference only, and do not upload a saved copy. See Explain Network Policy to Agents.

Upload State

Use nemoclaw <name> upload to copy files from the host into a sandbox.

SANDBOX=my-assistant
BACKUP_DIR=~/.nemoclaw/backups/20260320-120000 # pick a timestamp
nemoclaw "$SANDBOX" upload "$BACKUP_DIR/SOUL.md" /sandbox/.openclaw/workspace/
nemoclaw "$SANDBOX" upload "$BACKUP_DIR/USER.md" /sandbox/.openclaw/workspace/
nemoclaw "$SANDBOX" upload "$BACKUP_DIR/IDENTITY.md" /sandbox/.openclaw/workspace/
nemoclaw "$SANDBOX" upload "$BACKUP_DIR/AGENTS.md" /sandbox/.openclaw/workspace/
nemoclaw "$SANDBOX" upload "$BACKUP_DIR/TOOLS.md" /sandbox/.openclaw/workspace/
nemoclaw "$SANDBOX" upload "$BACKUP_DIR/HEARTBEAT.md" /sandbox/.openclaw/workspace/

Upload each optional memory path only when the backup contains it:

nemoclaw "$SANDBOX" upload "$BACKUP_DIR/MEMORY.md" /sandbox/.openclaw/workspace/
nemoclaw "$SANDBOX" upload "$BACKUP_DIR/memory/" /sandbox/.openclaw/workspace/memory/

Use the Source-Tree Backup Helper

Source-tree helper script

The scripts/backup-workspace.sh helper exists only in the NemoClaw source repository for engineering workflows. It is not installed by the standard installer. Host installs can use nemoclaw backup-all for the installer safety backup, or nemoclaw <name> download for an independent file copy.

Run the contributor setup from the NemoClaw source repository root before you create a backup:

npm run dev:setup

The helper checks that the built NemoClaw CLI can start before it creates a backup.

Back up a workspace:

./scripts/backup-workspace.sh backup my-assistant

The helper requires SOUL.md, USER.md, IDENTITY.md, AGENTS.md, TOOLS.md, and HEARTBEAT.md. It skips MEMORY.md and memory/ when those optional paths do not exist. It does not back up POLICY.md. A backup contains six to eight items, depending on which optional paths exist.

Both optional paths exist in this example.

Expected output:

Backing up workspace from sandbox 'my-assistant'...
Backup saved to /home/user/.nemoclaw/backups/20260320-120000/ (8 items)

If a required file cannot download, the helper deletes the new timestamped backup and exits. The helper also deletes the backup when an optional path exists but cannot download. Check the reported sandbox path for a symbolic link, unsupported file type, or transfer failure. Correct the path, then run the same backup command again.

Restore the most recent backup or a specific timestamp:

./scripts/backup-workspace.sh restore my-assistant
./scripts/backup-workspace.sh restore my-assistant 20260320-120000

Verify the saved files:

ls -la ~/.nemoclaw/backups/20260320-120000/

Both optional paths exist in this example.

Expected output:

AGENTS.md
HEARTBEAT.md
IDENTITY.md
MEMORY.md
SOUL.md
TOOLS.md
USER.md
memory/