What to back up
Everything that makes your agent yours lives in the OpenClaw data directory — on Linux and macOS that's ~/.openclaw, on Windows under your profile. Inside it you'll find the config, the installed skills, and the memory store. Back up that one directory and you can rebuild the agent exactly as it was on any machine. The model credential and channel tokens live in the config, which is exactly why this directory is both the most valuable thing to back up and the most sensitive.
How to back it up
The simplest reliable method is a timestamped copy:
cp -r ~/.openclaw ~/.openclaw.bak.$(date +%Y%m%d)
But a copy that sits on the same disk isn't a real backup — if the disk dies, both die. Push it somewhere else: an object store, a second machine, or a private repo (make sure it's private, given the tokens inside). A one-line cron job doing this nightly turns it from "something you mean to do" into "already done."
# nightly backup to a synced folder or object store
0 2 * * * tar -czf /backups/openclaw-$(date +\%Y\%m\%d).tar.gz ~/.openclaw
Restoring
To restore, stop the agent, copy the backup back over the data directory, and start it again:
sudo systemctl stop openclaw # if running as a service
cp -r ~/.openclaw.bak.20261129 ~/.openclaw
sudo systemctl start openclaw
After restoring, verify it actually works — send a test message and check a channel still responds. A backup you've never tested is a promise, not a backup.
Make it a habit
You only think about backups twice: when you set them up and when you desperately need them. Set up the nightly job once, then forget about it until the day it saves you. Given that the whole directory is usually a few megabytes, there's no cost excuse — this is the cheapest insurance you'll ever buy.