How-To Guide
Backup and Restore Hermes Agent Memory
Backup your Hermes Agent memory, skills, and config so you never lose your AI's learned context.
Quick answer
Back up Hermes memory by copying the ~/.hermes directory — it holds config.yaml, .env, sessions, memory, and skills. A nightly cron that snapshots that folder takes two minutes to set up and means a lost server never means a lost agent. Restore by dropping the directory back and restarting.
Your Hermes memory is months of learned context, preferences, and skills — losing it means starting from scratch. A simple backup routine takes 2 minutes to set up and runs automatically every night.
Managed cloud · API costs included · Skill library · Cancel anytime
Before you start:
- ☑Hermes Agent installed
- ☑Basic terminal familiarity for setting up cron
- ☑Optional: rclone for cloud backup (free)
Steps
- 1
Export memory
hermes memory export --output backup.json exports all memory to a JSON file
- 2
Backup config and skills
Copy your entire ~/.hermes/ directory: cp -r ~/.hermes/ ~/hermes-backup/
- 3
Automate with cron
Add a daily backup cron: 0 2 * * * tar czf ~/hermes-backup-$(date +%F).tar.gz ~/.hermes/
- 4
Cloud sync (optional)
Use rclone or rsync to push backups to S3, Google Drive, or any cloud storage
- 5
Restore from backup
hermes memory import backup.json or restore the ~/.hermes/ directory from your backup
Pro Tips
- 💡The entire Hermes state lives in ~/.hermes/ — backing up this directory is all you need
- 💡Use 'hermes memory export' to get a portable JSON snapshot before migrations or major config changes
- 💡Cloud sync with rclone keeps versioned copies automatically: 'rclone copy ~/.hermes/ backblaze:my-bucket/hermes/'
Troubleshooting
❌ hermes memory import fails with format error
✅ Check if the backup file was created with a different Hermes version. Try 'hermes memory import --legacy backup.json' for older format compatibility.
❌ Cron backup runs but files are empty
✅ Cron runs in a minimal environment — specify the full path to tar: '/usr/bin/tar czf ...' and ensure the backup destination directory exists before the cron runs.
❌ Restored memory missing recent conversations
✅ The ChromaDB vector store is a separate directory inside ~/.hermes/. Ensure your backup includes the entire ~/.hermes/ tree, not just the memory/ subdirectory.
FAQ
What exactly do I back up?
The ~/.hermes directory: config.yaml, .env, sessions, memory, and skills. That folder is the entire agent state, so backing it up captures everything needed to restore.
How do I restore Hermes memory?
Stop Hermes, put the backed-up ~/.hermes directory back in place, and restart. The agent picks up its memory, skills, and config exactly as they were.
Can I automate backups?
Yes — schedule a nightly job (cron or Hermes' own scheduler) that snapshots ~/.hermes. Months of learned context is worth a two-minute automated backup.