-
Notifications
You must be signed in to change notification settings - Fork 16.7k
[grafana] Update (seems to) delete all data #4665
Comments
Grafana 5 has deprecated dashboards/json importer. Since [stable/grafana] chart has recently migrated to 5.0.4, we now don't have dashboards. |
Just happened to me. Are you saying the default behaviour on |
@alexmbird It appears to be, however I don't believe that it is actually on purpose. IIRC, from the digging I did at the time (I was more focussed on recreating the dashboards that were deleted) the problem was that the helm chart generated a new PVC rather than reusing the existing one, which caused the old one to be recycled, and the default Reclaim behavior in many clusters is 'Delete'. If that's not the case in your cluster, the volume may still exist, and you can likely recover it. If not, and it's actually been deleted, I think you're out of lucky. After this happened to me I did the following:
Hoping this works out for you.... |
@nrmitchi thanks for replying so fast. It appears that's indeed what happened here. I look forward to a day rebuilding my dashboards :( At least the dataset is safe elsewhere. Advice to anyone else before doing a |
Hey @alexmbird @nrmitchi . I think that the problem is that grafana is using |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
I am personally against this issue closing, even though it is a bit stale. It's a pretty serious problem for anyone making use of this chart. |
So, I have kinda circumvented this issue by modifying the chart in my deployment, and that made this problem go away. The changes are not that hard to implement in this chart, but what stopped me is that they are not backward compatible. Here's what I did:
I'll be happy send a pull request. Suggestions as to what's the best way I can do that without breaking other people's existing deployments are welcome. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
@deltasquare4 I'd be keen to see a pull request for |
I'll see what I can do about the PR. External database config relies on overriding config through environment variables (http://docs.grafana.org/installation/configuration/#using-environment-variables), which is also something I added in my |
Looks like datasource imports has already been available through #5369. Restricting automatically imported dashboards to a directory will only "refresh" the dashboards there upon chart upgrade. You have to override
Combined with Keep the dashboards you'd like to change from UI out of these "seeded" folders to keep them from being deleted. While I haven't verified this with default Needless to say, please do back up your existing dashboards before upgrading. I use grafana's REST API to back up and restore the dashboards. Predictable and easier to script. I don't think having grafana running in a |
I'm using Terraform to configure my dashboards and datasources and have found the same issue when using |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
This issue is being automatically closed due to inactivity. |
This appears to still be an issue, at least it was for an upgrade I just performed. Information on how to avoid this should at least be documented. Edit: Perhaps not on recent versions. I was upgrading for a fairly old version and lost my data. I did some testing of upgrading from previous versions of more recent chart versions and data was retained between upgrades. A note about upgrades from older versions would be nice, if there is a known break-point where this changed. |
This actually seems to still be an issue, I've just tried to upgrade from chart Update: just to clarify, my values file has a |
Which chart:
stable/grafana
What happened:
helm upgrade -f chart-values/grafana.yaml grafana stable/grafana
The upgrade was simply bumping the version of the image to v5.0.4
All grafana data (data sources, dashboards, etc) are gone.
What you expected to happen:
It would update the chart and not delete all of the data.
Any default path that deletes existing data without warning is absolutely insane.
The text was updated successfully, but these errors were encountered: