grafana/docs/sources/shared/upgrade/upgrade-common-tasks.md
Isabel Matwawana e26cd8614d
Docs: fix config file info in upgrade guide (#83273)
* Updated incorrect custom config file names and locations

* Corrected default config file name

* Updated more config file info

* Apply suggestions from code review

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>

* Reverted change

* Fixed default config file info, added second custom file option, and added note about file locations

* Added file path for second custom option

* Apply suggestion from review

Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>

* Apply suggestion from review

Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>

* Apply suggestions from review

Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>

* Apply suggestion from review

* Add version interpolation syntax

* Updated wording

* Ran prettier

---------

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
2024-02-29 09:39:25 -05:00

5.3 KiB

labels title
products
enterprise
oss
Upgrade guide common tasks

Upgrade Grafana

The following sections provide instructions for how to upgrade Grafana based on your installation method. For more information on where to find configuration files, refer to Configuration file location.

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>/grafana.ini.

    This enables you to upgrade Grafana without the risk of losing your configuration changes.

  2. Download the latest version of Grafana.

  3. Run the following dpkg -i command.

    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>/grafana.ini.

    This enables you to upgrade Grafana without the risk of losing your configuration changes.

  2. Run the following commands:

    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 the custom configuration file, custom.ini or grafana.ini.

    This enables you to upgrade Grafana without the risk of losing your configuration changes.

  2. Download the binary .tar.gz package.

  3. 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>/grafana.ini.

    This enables you to upgrade Grafana without the risk of losing your configuration changes.

  2. Perform one of the following steps based on your installation.

Docker

To upgrade Grafana running in a Docker container, complete the following steps:

  1. Use Grafana environment variables to save your custom configurations; this is the recommended method. Alternatively, you can view your configuration files manually by accessing the deployed container.

    This enables you to upgrade Grafana without the risk of losing your configuration changes.

  2. 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 %}}

    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.

  2. Download the Windows binary package.

  3. 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 the custom configuration file, custom.ini.

    This enables you to upgrade Grafana without the risk of losing your configuration changes.

  2. Download the Mac binary package.

  3. 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:

grafana cli plugins update-all