mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 18:02:30 +08:00

* starts to step out the backup content * adds shared shortcode * shares intro content * Update docs/sources/administration/back-up-grafana/index.md Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * updates 10 and 9.5 upgrade guides with shared content * makes prettier * incorporates feedback --------- Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
142 lines
4.9 KiB
Markdown
142 lines
4.9 KiB
Markdown
---
|
|
labels:
|
|
products:
|
|
- enterprise
|
|
- oss
|
|
title: Upgrade guide common tasks
|
|
---
|
|
|
|
## 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
|
|
```
|