Backup and Restore Hermes Agent Memory
Backup your Hermes Agent memory, skills, and config so you never lose your AI's learned context.
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.
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.