Skip to main content

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
Plan upgrades to stay within the support window.

Upgrade preparation

Review release documentation

Before upgrading, review:

Create a backup

Always back up before upgrading:
Refer to the backup and restore guide for detailed procedures.

Check plugin compatibility

Verify that installed plugins are compatible with the target version:
Replace <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:
  1. Restore a production database backup to the test environment
  2. Upgrade the test instance
  3. Verify dashboards, data sources, and alerts function correctly
  4. Test key workflows and integrations
  5. Review logs for errors or warnings

Upgrade procedures

Package manager upgrade (Linux)

For installations using package managers: Debian/Ubuntu (APT):
RHEL/CentOS (YUM/DNF):

Binary upgrade

For binary installations:

Docker upgrade

For containerized deployments: Docker:
Docker Compose:
Then apply the update:

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:
  1. Detects database schema version
  2. Applies pending migrations in order
  3. Locks database during migration (configurable)
  4. Logs migration progress
  5. Starts normally after successful migration

Migration settings

Configure migration behavior in grafana.ini:
Refer to conf/defaults.ini:201 for database migration settings.

Migration monitoring

Monitor migration logs during upgrades:
Successful migrations log messages like:

Plugin upgrades

Upgrade plugins after upgrading Grafana.

Upgrade all plugins

Upgrade all installed plugins:
Refer to pkg/cmd/grafana-cli/commands/upgrade_all_command.go for the CLI implementation.

Upgrade specific plugin

Upgrade a single plugin:
Replace <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:
Expected response:

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:
  1. Stop the upgraded Grafana instance
  2. Restore the database backup from before the upgrade
  3. Restore previous Grafana binary/package
  4. Restore previous configuration files
  5. Start Grafana with the previous version
Important: Don’t downgrade database schema. Always restore from backup.

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
Always review the breaking changes documentation for your target version.

Getting help

If you encounter issues during an upgrade:

Next steps