Backup & Restore
Overview
crocbot stores configuration and state in persistent storage. This guide covers backup procedures for Docker deployments.What Gets Backed Up
Backup Methods
Method 1: Config Export (Recommended)
Export configuration via the setup wizard endpoint:Method 2: Backup Script
Use the included backup script for automated backups:Method 3: Docker Volume Backup
For full state backup including all files:Restore Procedures
Restore from Config Export
- Deploy a fresh crocbot instance
- Visit
https://your-domain.com/setup - Import the config file via the setup wizard
Restore from Volume Backup
Scheduled Backups
Using Cron (Local/VPS)
Add to crontab (crontab -e):
Using GitHub Actions
Create.github/workflows/backup.yml:
Backup Verification
Always verify backups are valid:Retention Policy
Disaster Recovery
- Provision new instance
- Deploy crocbot following Deployment guide
- Restore config via setup wizard or volume restore
- Verify channels are connected (Telegram, etc.)
- Test by sending a message
Troubleshooting
Export endpoint returns 401
The/setup/export endpoint may require authentication:
- Set
SETUP_PASSWORDenvironment variable - Include password in request headers
Volume backup permission denied
Run backup commands withsudo or ensure Docker socket access.
