# OCBackup — Restore Instructions## What Gets Backed Up- Workspace: SOUL.md, USER.md, IDENTITY.md, AGENTS.md, TOOLS.md, HEARTBEAT.md, MEMORY.md- Memory: all files in workspace/memory/- Scripts: all .sh files in scripts/- Config: openclaw.json (with API keys redacted for safety)- Skills: metadata (SKILL.md, _meta.json) for each installed skill- Reports: last 4 weekly health reports- Cron: snapshot of crontab at time of backup## Where Backups Live- Google Drive: OpenClaw/OCBackup/- Named: openclaw_backup_YYYY-MM-DD.tar.gz- Retention: 3 days (older auto-pruned)## How to Restore### List available backups```bash/home/HHS/.openclaw/scripts/restore_from_drive.sh --list```### Restore latest backup```bash/home/HHS/.openclaw/scripts/restore_from_drive.sh```### Restore a specific date```bash/home/HHS/.openclaw/scripts/restore_from_drive.sh 2026-02-25```### What happens during restore1. Downloads the backup tarball from Google Drive2. Creates a safety backup of your current state (in /tmp/)3. Extracts and copies workspace files, memory, and scripts4. Saves config (with redacted tokens) as openclaw.json.restored5. Saves crontab snapshot as crontab.restored.txt6. Validates core files exist### After restore1. Review restored files in ~/.openclaw/workspace2. Re-add API keys to openclaw.json if needed (tokens are redacted in backups)3. Restart OpenClaw: `openclaw gateway restart`4. If something went wrong, roll back from the safety backup## Moving to a New Machine1. Install OpenClaw on the new machine2. Set up gog (Google Workspace CLI) and authenticate3. Run the restore script — it pulls everything from Drive4. Re-add your API keys (Anthropic, OpenRouter, Telegram bot token)5. Restore crontab: `crontab ~/.openclaw/crontab.restored.txt`6. Restart OpenClaw## Schedule- Automatic backup runs every night at midnight local time- Keeps last 3 days, prunes older backups