Avoid losing your application data (questions, dashboards, collections, users, and settings) by regularly backing up your Metabase application database.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/metabase/metabase/llms.txt
Use this file to discover all available pages before exploring further.
Metabase uses a single SQL database for all runtime application data. Back up this database to protect your Metabase configuration and content.
What to back up
The Metabase application database contains:- User accounts and permissions
- Questions (saved queries)
- Dashboards and visualizations
- Collections and organization
- Data source connections
- Settings and configuration
- Alerts and subscriptions
- Audit logs (if enabled)
When to back up
Create backups:- Before every upgrade - Essential for safe rollback
- On a regular schedule - Daily or weekly depending on usage
- Before major configuration changes - Like permission updates or integrations
- After creating important content - New dashboards or critical questions
Backing up PostgreSQL
PostgreSQL is the recommended application database for production deployments.Using pg_dump
- Full backup
- SQL format
- With password
Create a complete backup of your Metabase database:This creates a compressed binary backup with timestamps.
Restoring PostgreSQL backups
Automated PostgreSQL backups
Create a backup script and schedule it with cron:backup_metabase.sh
Backing up MySQL or MariaDB
Using mysqldump
- Full backup
- With password in command
- Compressed backup
Restoring MySQL backups
Automated MySQL backups
backup_metabase.sh
Backing up H2 database
If you must back up an H2 database:For Docker deployments
For JAR deployments
H2 database files must be backed up while Metabase is stopped to ensure consistency.
Cloud-managed databases
Amazon RDS
If you’re using Amazon RDS for your Metabase application database:- Enable automated backups in the RDS console
- Set backup retention period (7-35 days)
- Configure backup window during low-usage hours
- Enable point-in-time recovery for additional protection
Amazon RDS Backup Guide
Official AWS documentation for RDS backups
Azure Database
Azure Database for PostgreSQL automatically backs up your server. Configure:- Backup retention period (7-35 days)
- Geo-redundant backup (optional)
- Point-in-time restore capability
Google Cloud SQL
Cloud SQL provides automatic backups:- Configure automated backup window
- Enable binary logging for point-in-time recovery
- Set backup retention period
Backup best practices
Test your backups regularly
Regularly test restoration to ensure backups are valid:
- Restore to a test environment monthly
- Verify data integrity
- Document restoration procedures
- Train team members on restoration process
Store backups securely
Protect your backup files:
- Use encryption for backup files
- Store in multiple locations (3-2-1 rule)
- Restrict access to backup storage
- Use separate infrastructure from production
Implement retention policies
Balance storage costs with recovery needs:
- Keep daily backups for 7-30 days
- Keep weekly backups for 3 months
- Keep monthly backups for 1 year
- Archive critical snapshots longer
Backup storage options
Amazon S3
Upload backups to S3 for durable, scalable storage
Azure Blob Storage
Use Azure CLI to upload backups
Google Cloud Storage
Upload with gsutil
Network storage
Mount NFS or SMB shares for backup storage
Disaster recovery plan
A complete disaster recovery plan should include:- Backup procedures - Documented and automated
- Restoration procedures - Step-by-step guides
- Recovery time objective (RTO) - How long to restore
- Recovery point objective (RPO) - Acceptable data loss window
- Emergency contacts - Who to notify
- Escalation procedures - When to escalate
Next steps
Upgrading Metabase
Always back up before upgrading
Configuring database
Set up a production-ready application database
Migrating from H2
Move from H2 to PostgreSQL or MySQL
Running on Docker
Deploy with proper volume management