Files
grafana/docs/sources/shared/upgrade/upgrade-common-tasks.md
Jack Baldry 7eb17bccca Explicitly set all front matter labels in the source files (#71548)
* Set every page to have defaults of 'Enterprise' and 'Open source' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration pages to have of 'Cloud', 'Enterprise', and 'Open source' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/enterprise-licensing pages to have 'Enterprise' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/organization-management pages to have 'Enterprise' and 'Open source' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/provisioning pages to have 'Enterprise' and 'Open source' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/recorded-queries pages to have labels cloud,enterprise

* Set administration/roles-and-permissions/access-control pages to have labels cloud,enterprise

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/stats-and-license pages to have labels cloud,enterprise

* Set alerting pages to have labels cloud,enterprise,oss

* Set breaking-changes pages to have labels cloud,enterprise,oss

* Set dashboards pages to have labels cloud,enterprise,oss

* Set datasources pages to have labels cloud,enterprise,oss

* Set explore pages to have labels cloud,enterprise,oss

* Set fundamentals pages to have labels cloud,enterprise,oss

* Set introduction/grafana-cloud pages to have labels cloud

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix introduction pages products

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set panels-visualizations pages to have labels cloud,enterprise,oss

* Set release-notes pages to have labels cloud,enterprise,oss

* Set search pages to have labels cloud,enterprise,oss

* Set setup-grafana/configure-security/audit-grafana pages to have labels cloud,enterprise

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set setup-grafana/configure-security/configure-authentication pages to have labels cloud,enterprise,oss

* Set setup-grafana/configure-security/configure-authentication/enhanced-ldap pages to have labels cloud,enterprise

* Set setup-grafana/configure-security/configure-authentication/saml pages to have labels cloud,enterprise

* Set setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault pages to have labels cloud,enterprise

* Set setup-grafana/configure-security/configure-request-security pages to have labels cloud,enterprise,oss

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set setup-grafana/configure-security/configure-team-sync pages to have labels cloud,enterprise

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set setup-grafana/configure-security/export-logs pages to have labels cloud,enterprise

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set troubleshooting pages to have labels cloud,enterprise,oss

* Set whatsnew pages to have labels cloud,enterprise,oss

* Apply updated labels from review

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-07-18 09:10:12 +01:00

198 lines
7.2 KiB
Markdown

---
labels:
products:
- enterprise
- oss
title: Upgrade guide common tasks
---
We recommend that you upgrade Grafana often to stay current with the latest fixes and enhancements.
Because Grafana upgrades are backward compatible, the upgrade process is straightforward, and dashboards and graphs will not change.
In addition to common tasks you should complete for all versions of Grafana, there might be additional upgrade tasks to complete for a version.
{{% admonition type="note" %}}
There might be breaking changes in some releases. We outline these changes in the [What's New ]({{< relref "../../whatsnew/" >}}) document for most releases or a separate [Breaking changes]({{< relref "../../breaking-changes/" >}}) document for releases with many breaking changes.
{{% /admonition %}}
For versions of Grafana prior to v9.2, we published additional information in the [Release Notes]({{< relref "../../release-notes/" >}}).
When available, we list all changes with links to pull requests or issues in the [Changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md).
{{% admonition type="note" %}}
When possible, we recommend that you test the Grafana upgrade process in a test or development environment.
{{% /admonition %}}
## Back up the Grafana database
Although Grafana automatically upgrades the database on startup, we recommend that you back up your Grafana database so that you can roll back to a previous version, if required.
### SQLite
If you use SQLite, you only need to back up the `grafana.db` file. On Unix systems, the database file is usually located in `/var/lib/grafana/`.
If you are unsure which database you use and where it is stored, check the Grafana configuration file. If you
installed Grafana to a custom location using a binary tar/zip, the database is usually located in `<grafana_install_dir>/data`.
### MySQL
To back up or restore a MySQL Grafana database, run the following commands:
```bash
backup:
> mysqldump -u root -p[root_password] [grafana] > grafana_backup.sql
restore:
> mysql -u root -p grafana < grafana_backup.sql
```
### Postgres
To back up or restore a Postgres Grafana database, run the following commands:
```bash
backup:
> pg_dump grafana > grafana_backup
restore:
> psql grafana < grafana_backup
```
## Backup plugins
We recommend that you back up installed plugins before you upgrade Grafana so that you can roll back to a previous version of Grafana, if necessary.
## Upgrade Grafana
The following sections provide instructions for how to upgrade Grafana based on your installation method.
### Debian
To upgrade Grafana installed from a Debian package (`.deb`), complete the following steps:
1. In your current installation of Grafana, save your custom configuration changes to a file named `<grafana_install_dir>/conf/custom.ini`.
This enables you to upgrade Grafana without the risk of losing your configuration changes.
1. [Download](https://grafana.com/grafana/download?platform=linux) the latest version of Grafana.
1. Run the following `dpkg -i` command.
```bash
wget <debian package url>
sudo apt-get install -y adduser
sudo dpkg -i grafana_<version>_amd64.deb
```
### APT repository
To upgrade Grafana installed from the Grafana Labs APT repository, complete the following steps:
1. In your current installation of Grafana, save your custom configuration changes to a file named `<grafana_install_dir>/conf/custom.ini`.
This enables you to upgrade Grafana without the risk of losing your configuration changes.
1. Run the following commands:
```bash
sudo apt-get update
sudo apt-get upgrade
```
Grafana automatically updates when you run `apt-get upgrade`.
### Binary .tar file
To upgrade Grafana installed from the binary `.tar.gz` package, complete the following steps:
1. In your current installation of Grafana, save your custom configuration changes to a file named `<grafana_install_dir>/conf/custom.ini`.
This enables you to upgrade Grafana without the risk of losing your configuration changes.
1. [Download](https://grafana.com/grafana/download) the binary `.tar.gz` package.
1. Extract the downloaded package and overwrite the existing files.
### RPM or YUM
To upgrade Grafana installed using RPM or YUM complete the following steps:
1. In your current installation of Grafana, save your custom configuration changes to a file named `<grafana_install_dir>/conf/custom.ini`.
This enables you to upgrade Grafana without the risk of losing your configuration changes.
1. Perform one of the following steps based on your installation.
- If you [downloaded an RPM package](https://grafana.com/grafana/download) to install Grafana, then complete the steps documented in [Install Grafana on Red Hat, RHEL, or Fedora]({{< relref "../../setup-grafana/installation/redhat-rhel-fedora/" >}}) or [Install Grafana on SUSE or openSUSE]({{< relref "../../setup-grafana/installation/suse-opensuse/" >}}) to upgrade Grafana.
- If you used the Grafana YUM repository, run the following command:
```bash
sudo yum update grafana
```
- If you installed Grafana on openSUSE or SUSE, run the following command:
```bash
sudo zypper update
```
### Docker
To upgrade Grafana running in a Docker container, complete the following steps:
1. In your current installation of Grafana, save your custom configuration changes to a file named `<grafana_install_dir>/conf/custom.ini`.
This enables you to upgrade Grafana without the risk of losing your configuration changes.
1. Run a commands similar to the following commands.
{{% admonition type="note" %}}
This is an example. The parameters you enter depend on how you configured your Grafana container.
{{% /admonition %}}
```bash
docker pull grafana/grafana
docker stop my-grafana-container
docker rm my-grafana-container
docker run -d --name=my-grafana-container --restart=always -v /var/lib/grafana:/var/lib/grafana grafana/grafana
```
### Windows
To upgrade Grafana installed on Windows, complete the following steps:
1. In your current installation of Grafana, save your custom configuration changes to a file named `<grafana_install_dir>/conf/custom.ini`.
This enables you to upgrade Grafana without the risk of losing your configuration changes.
1. [Download](https://grafana.com/grafana/download) the Windows binary package.
1. Extract the contents of the package to the location in which you installed Grafana.
You can overwrite existing files and folders, when prompted.
### Mac
To upgrade Grafana installed on Mac, complete the following steps:
1. In your current installation of Grafana, save your custom configuration changes to a file named `<grafana_install_dir>/conf/custom.ini`.
This enables you to upgrade Grafana without the risk of losing your configuration changes.
1. [Download](https://grafana.com/grafana/download) the Mac binary package.
1. Extract the contents of the package to the location in which you installed Grafana.
You can overwrite existing files and folders, when prompted.
## Update Grafana plugins
After you upgrade Grafana, we recommend that you update all plugins because a new version of Grafana
can make older plugins stop working properly.
Run the following command to update plugins:
```bash
grafana cli plugins update-all
```