Overview
Regular backups are critical for protecting your Chatwoot data. This guide covers backup and restore procedures for PostgreSQL databases, Redis data, and file storage.Database Backup
PostgreSQL Backup
Chatwoot uses PostgreSQL with the pgvector extension for storing all application data.Manual Backup
Create a full database backup:Docker Environment Backup
If running Chatwoot with Docker Compose:Automated Backup Script
Create a backup script at/usr/local/bin/chatwoot-backup.sh:
Redis Backup
Redis stores session data, cache, and Sidekiq job queues.Enable RDB Snapshots
Edit Redis configuration:Manual Redis Backup
Docker Redis Backup
File Storage Backup
Chatwoot stores uploaded files, avatars, and attachments using Active Storage.Local Storage
If using local file storage (default):S3/Cloud Storage
If using cloud storage (S3, GCS, Azure), backups are handled by the provider. Enable versioning:Restore Procedures
Restore PostgreSQL Database
From SQL Dump
From Custom Format Dump
Point-in-Time Recovery (PITR)
For production systems, configure PostgreSQL continuous archiving:Restore Redis Data
Restore File Storage
Disaster Recovery
Complete System Restore
- Install Chatwoot on new server
- Stop all services
- Restore PostgreSQL database
- Restore Redis data
- Restore file storage
- Update environment variables if needed
- Run migrations:
bundle exec rails db:migrate - Restart services
Migration to New Server
Backup Verification
Test Restore Process
Regularly test your backups:Backup Monitoring
Monitor backup success:Backup Best Practices
- Frequency: Daily full backups, hourly incremental (for large databases)
- Retention: Keep 30 days of daily backups, 12 months of monthly backups
- Off-site: Store backups in different geographic location
- Encryption: Encrypt backups containing sensitive data
- Testing: Test restore process monthly
- Documentation: Document restore procedures and keep updated
- Monitoring: Alert on backup failures
- Version Control: Keep backup scripts in version control

