Upgrade & Rollback Grafana on Windows
Safe step-by-step procedure for upgrading Grafana to a new version on Windows, including backup strategy, MSI upgrade execution and how to roll back if an issue is discovered after upgrading.
Before you upgrade — checklist
- Read the release notes for breaking changes and deprecated features.
- Back up the Grafana data directory (dashboards, users, data sources are stored here).
- Back up grafana.ini and any custom configuration files.
- Note the current Grafana version — you may need to download the previous MSI if rollback is required.
- Schedule the upgrade during a maintenance window if Grafana is business-critical.
Step 1 — Back up Grafana data
The Grafana data directory contains the SQLite database (dashboards, users, alerts) and other state. Back it up before any upgrade.
# Default data directory location
# C:\Program Files\GrafanaLabs\grafana\data
# Stop the service first
Stop-Service -Name "Grafana" -Force
# Copy entire data directory to backup location
$backupPath = "C:\Backups\grafana-backup-$(Get-Date -Format 'yyyyMMdd-HHmm')"
Copy-Item -Path "C:\Program Files\GrafanaLabs\grafana\data" -Destination $backupPath -Recurse
Copy-Item -Path "C:\Program Files\GrafanaLabs\grafana\conf\grafana.ini" -Destination $backupPath
Write-Host "Backup complete: $backupPath"Step 2 — Download the new MSI
Get the new version MSI from grafana.com/grafana/download. Verify the digital signature before proceeding — the publisher must read Grafana Labs.
# Verify checksum of downloaded MSI
Get-FileHash "grafana-11.6.0.windows-amd64.msi" -Algorithm SHA256
# Compare with the hash shown on the Grafana download pageStep 3 — Run the upgrade MSI
The Grafana MSI supports in-place upgrades. Run the new MSI as Administrator while the service is stopped. The installer preserves your existing configuration and data directory.
# Ensure service is stopped
Stop-Service -Name "Grafana" -Force
# Run the new MSI (double-click or via command line)
msiexec /i "grafana-11.6.0.windows-amd64.msi" /quiet /norestart
# Start the upgraded service
Start-Service -Name "Grafana"
# Verify new version
Start-Sleep -Seconds 5
Invoke-WebRequest -Uri "http://localhost:3000/api/health" -UseBasicParsingStep 4 — Verify after upgrade
Check service status
Get-Service -Name "Grafana"Open Grafana UI
Navigate to http://localhost:3000. Log in and confirm the version shown in Help → About matches the new release.
Check dashboards and data sources
Verify your existing dashboards load correctly and data source connections are intact. Check Connections → Data sources and test each one.
Review Grafana logs
Get-Content "C:\Program Files\GrafanaLabs\grafana\data\log\grafana.log" -Tail 30Look for any ERROR or WARN lines related to the upgrade.
Rollback procedure
If the new version causes issues, roll back by uninstalling the new version and reinstalling the previous one, then restoring your data backup.
# Stop service
Stop-Service -Name "Grafana" -Force
# Uninstall current version via Apps & Features
# or silently:
# Get the product code from registry first:
Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "*Grafana*" } | Select-Object Name, Version, IdentifyingNumber
# Uninstall using the product code (replace {GUID} with actual value)
msiexec /x "{GUID}" /quiet /norestart
# Restore data directory from backup
Remove-Item "C:\Program Files\GrafanaLabs\grafana\data" -Recurse -Force
Copy-Item -Path "C:\Backups\grafana-backup-20260608-1200\data" -Destination "C:\Program Files\GrafanaLabs\grafana\data" -Recurse
# Restore grafana.ini
Copy-Item "C:\Backups\grafana-backup-20260608-1200\grafana.ini" "C:\Program Files\GrafanaLabs\grafana\conf\grafana.ini"
# Install the previous MSI
msiexec /i "grafana-11.5.0.windows-amd64.msi" /quiet /norestart
# Start the service
Start-Service -Name "Grafana"Automated backup script
Schedule this script with Windows Task Scheduler to run weekly backups before upgrades.
# grafana-backup.ps1
$grafanaData = "C:\Program Files\GrafanaLabs\grafana\data"
$grafanaConf = "C:\Program Files\GrafanaLabs\grafana\conf\grafana.ini"
$backupRoot = "C:\Backups\Grafana"
$timestamp = Get-Date -Format "yyyyMMdd-HHmm"
$dest = "$backupRoot\grafana-$timestamp"
New-Item -ItemType Directory -Path $dest -Force | Out-Null
Copy-Item -Path $grafanaData -Destination $dest -Recurse
Copy-Item -Path $grafanaConf -Destination $dest
# Remove backups older than 30 days
Get-ChildItem $backupRoot -Directory | Where-Object { $_.CreationTime -lt (Get-Date).AddDays(-30) } | Remove-Item -Recurse -Force
Write-Host "Grafana backup complete: $dest"