Config files overwritten when updating via windows installer

  • What Grafana version and what operating system are you using?
    9.2.6 = > 9.3.1

  • What are you trying to achieve?
    Updating without losing config files. My config file is C:\Program Files\GrafanaLabs\grafana\conf\defaults.ini

  • How are you trying to achieve it?
    Executing the windows installer found here: Download Grafana | Grafana Labs

  • What happened?
    Config files in C:\Program Files\GrafanaLabs\grafana\conf got overwritten.

  • What did you expect to happen?
    Config file to be preserved.

  • Did you follow any online instructions? If so, what is the URL?
    Documentation explicitly states config files do not need to be backed up.
    Upgrade Grafana | Grafana documentation
    “Configuration files do not need to be backed up. However, you might want to in case you add new configuration options after upgrade and then rollback.”

What config file should I use so that it doesn’t get overwritten? Seems weird to edit “defaults.ini”, isn’t there some custom.ini or something? How do I tell grafana to us this file instead? I know it can be given as a command line parameter in the service, but the service points to nssm.exe which is a problem to begin with imo.

Hello @jeremymahieu,

Did you read the other part on the documentation about configuring grafana on windows?

Here’s the quote:

On Windows, the sample.ini file is located in the same directory as defaults.ini file. It contains all the settings commented out. Copy sample.ini and name it custom.ini .

Further down the page there’s more about how to edit the newly created custom.ini and remove comments and so on. Grafana will automatically look for custom.ini everytime the windows service starts. This custom.ini will also remain the same during an upgrade.

1 Like

I seem to have missed that, thanks.