Use this skill when the user asks to 'backup OpenClaw', 'restore a snapshot', 'roll back memory', 'check backup status', 'view backup history', 'undo agent c...
Hourly incremental backup for this OpenClaw instance — restic-powered, YAML-configured. Silent on success, Telegram notification on failure.
Time Clawshine protects OpenClaw's runtime context (memory, sessions, credentials, config) with hourly snapshots. It runs automatically via cron. You can also trigger it manually or restore any point in the last 72 hours.
Repository: Configured in {baseDir}/config.yaml (default: /var/backups/time-clawshine)
Log: /var/log/time-clawshine.log
Password file: /etc/time-clawshine.pass
source {baseDir}/lib.sh && tc_load_config && restic_cmd snapshots 2>/dev/null && echo "Already initialized"
{baseDir}/config.yaml with their Telegram bot_token and chat_id, then run:
sudo bash {baseDir}/bin/setup.sh
tail -5 /var/log/time-clawshine.log
sudo bash {baseDir}/bin/backup.sh
Then confirm with:
tail -5 /var/log/time-clawshine.log
Show the last 10 log lines:
tail -20 /var/log/time-clawshine.log
List all snapshots (most recent first):
source {baseDir}/lib.sh && tc_load_config && restic_cmd snapshots
Show what changed between the two most recent snapshots:
source {baseDir}/lib.sh && tc_load_config
SNAPS=$(restic_cmd snapshots --json | jq -r '.[-2:][].id')
restic_cmd diff $SNAPS
Interactive restore (recommended — always dry-runs first):
sudo bash {baseDir}/bin/restore.sh
Restore a specific file from the latest snapshot:
sudo bash {baseDir}/bin/restore.sh latest --file /root/.openclaw/workspace/MEMORY.md --target /tmp/tc-restore
# Preview the result, then move manually:
# cp /tmp/tc-restore/root/.openclaw/workspace/MEMORY.md /root/.openclaw/workspace/MEMORY.md
Restore a specific snapshot by ID:
sudo bash {baseDir}/bin/restore.sh <snapshot_id>
Always confirm with the user before executing a full restore to /.
source {baseDir}/lib.sh && tc_load_config && restic_cmd check
Edit {baseDir}/config.yaml with the requested changes (schedule, retention, paths, Telegram credentials), then re-run setup to apply:
sudo bash {baseDir}/bin/setup.sh
/var/log/time-clawshine.log. No output unless there is a failure.bot_token and chat_id, failures are logged only./etc/time-clawshine.pass (chmod 600). Losing it means losing access to all snapshots.secrets.env or .pass files to git. They are excluded via .gitignore.Run the AI-assisted customization helper:
sudo bash {baseDir}/bin/customize.sh
This will:
config.yaml only after explicit confirmationRemind the user: the original config.yaml is saved as config.yaml.bak before any changes.
If the user wants to add paths manually instead:
backup.extra_paths in {baseDir}/config.yaml for extra inclusionsbackup.extra_excludes in {baseDir}/config.yaml for extra exclusionssudo bash {baseDir}/bin/setup.shZIP package — ready to use