Upgrading Grafana
Upgrading Grafana provides access to new features, performance improvements, and security fixes. This guide covers upgrade strategies, procedures, and best practices.Before you begin
Before upgrading your Grafana instance, ensure you have:- A complete backup of your Grafana database and configuration files
- Reviewed the release notes and upgrade guide for your target version
- Tested the upgrade in a non-production environment
- Planned maintenance window if downtime is required
Understanding Grafana versioning
Grafana follows semantic versioning (MAJOR.MINOR.PATCH):- Major releases (for example, 11.0 to 12.0) - Once yearly, may include breaking changes
- Minor releases (for example, 12.1 to 12.2) - Feature updates, minimal breaking changes
- Patch releases (for example, 12.1.0 to 12.1.1) - Bug fixes and security patches
Upgrade strategies
Choose an upgrade strategy based on your organization’s needs:Rolling upgrade strategy
Upgrade to each minor version sequentially:- Advantages: Smaller changelogs, easier troubleshooting, lower risk
- Disadvantages: More frequent upgrades required
- Example: 12.1 → 12.2 → 12.3 → 12.4
Major version upgrade strategy
Upgrade once per year to major versions:- Advantages: Fewer upgrades, longer testing periods
- Disadvantages: Larger changelogs, more potential breaking changes
- Example: 11.0 → 12.0 → 13.0
Patch-only strategy
Apply only security and bug fix patches:- Advantages: Minimal changes, highest stability
- Disadvantages: Miss new features, limited support lifecycle
- Example: 12.1.0 → 12.1.1 → 12.1.2
Version support lifecycle
Grafana versions receive support for a limited time:- Current major version - Full support with features, bug fixes, and security patches
- Previous major version - Security and critical bug fixes for 12 months
- Older versions - No support, upgrade recommended
Upgrade preparation
Review release documentation
Before upgrading, review:- Release notes for new features
- Changelog for detailed changes
- Upgrade guides for version-specific steps
- Breaking changes documentation
Create a backup
Always back up before upgrading:Check plugin compatibility
Verify that installed plugins are compatible with the target version:<PLUGIN_ID> with your plugin identifier.
Update incompatible plugins before or immediately after upgrading.
Test in non-production
Test the upgrade in a development or staging environment:- Restore a production database backup to the test environment
- Upgrade the test instance
- Verify dashboards, data sources, and alerts function correctly
- Test key workflows and integrations
- Review logs for errors or warnings
Upgrade procedures
Package manager upgrade (Linux)
For installations using package managers: Debian/Ubuntu (APT):Binary upgrade
For binary installations:Docker upgrade
For containerized deployments: Docker:Kubernetes upgrade
For Kubernetes deployments using Helm:Database migrations
Grafana automatically runs database migrations on startup when upgrading.Migration process
When Grafana starts after an upgrade:- Detects database schema version
- Applies pending migrations in order
- Locks database during migration (configurable)
- Logs migration progress
- Starts normally after successful migration
Migration settings
Configure migration behavior ingrafana.ini:
conf/defaults.ini:201 for database migration settings.
Migration monitoring
Monitor migration logs during upgrades:Plugin upgrades
Upgrade plugins after upgrading Grafana.Upgrade all plugins
Upgrade all installed plugins:pkg/cmd/grafana-cli/commands/upgrade_all_command.go for the CLI implementation.
Upgrade specific plugin
Upgrade a single plugin:<PLUGIN_ID> with the plugin identifier.
Refer to pkg/cmd/grafana-cli/commands/upgrade_command.go:15 for the CLI implementation.
Restart after plugin upgrade
Restart Grafana after upgrading plugins:Post-upgrade verification
After upgrading, verify functionality:Check service status
Verify Grafana is running:Check application logs
Review logs for errors:Verify database connectivity
Test the health endpoint:Test dashboards
- Open key dashboards and verify they load correctly
- Check that panels render data
- Verify variables and templating work
Test data sources
- Navigate to Configuration → Data Sources
- Test connectivity for critical data sources
- Verify queries return expected data
Verify alerts
- Check alert rules are evaluating
- Verify notifications are being sent
- Review alert history for anomalies
Rollback procedures
If you encounter issues after upgrading, you can roll back.Database rollback considerations
Database migrations are generally not reversible. To roll back:- Stop the upgraded Grafana instance
- Restore the database backup from before the upgrade
- Restore previous Grafana binary/package
- Restore previous configuration files
- Start Grafana with the previous version
Rollback procedure
Upgrade best practices
- Backup first - Always create a complete backup before upgrading
- Test thoroughly - Test upgrades in non-production environments
- Read documentation - Review release notes and upgrade guides
- Check compatibility - Verify plugin and integration compatibility
- Plan maintenance - Schedule upgrades during low-traffic periods
- Monitor closely - Watch logs and metrics during and after upgrade
- Have rollback plan - Prepare rollback procedures before starting
- Stay current - Regularly upgrade to stay within support lifecycle
- Document process - Record upgrade steps and any issues encountered
Breaking changes
Major and some minor releases may include breaking changes:- API endpoint changes
- Configuration option deprecations
- Plugin API updates
- Database schema changes
- Feature removals
Getting help
If you encounter issues during an upgrade:- Review logs for specific error messages
- Search the Grafana community forum
- Check GitHub issues
- Consult the upgrade guides
- Contact Grafana support (Enterprise customers)
Next steps
- Set up monitoring for your upgraded instance
- Review high availability configurations
- Update your backup procedures if needed