victronenergy / venus-grafana

Default Grafana dashboards, for docker solution and Venus OS Large
MIT License
50 stars 11 forks source link

Migration from venus-docker-grafana to venus-grafana #16

Open jjx- opened 5 months ago

jjx- commented 5 months ago

It would be great to give users a migration path from venus-docker-grafana to venus-grafana which includes keeping the data in the influx db and the grafana dasboards.

I am using venus-docker-grafana for about a year and would like to migrate to venus-grafana to be able to benefit from the latest updates. I do want to keep my data of the last year and the grafana dasboards I built.

Is there a way to upgrade/migrate and if so which are the steps I need? If there is no easy way of migration then a guide on how to export the data on the old one and import it on the new one would be appreciated.

mman commented 5 months ago

@jjx- Great idea, I should document that in the future.

For the moment:

The underlying database, structure, and config file format have not changed. Also with Influx DB we are stuck at version 1.8 which is the last one running officially on 32bit arm systems, so no change there as well and all data that you are storing will still be readable and stored in the same way after any update.

The only changes that happened are actually internal, fixing bugs, making javascript code compile after many component updates, etc.

If you take your docker-compose.yaml file and simply replace the

all should be well. But of course YMMV, please post your docker-compose.yaml here and I can test the procedure for you on my test data and possibly write up what has happened :)

jjx- commented 5 months ago

Thank you for your quick response!

I tried it on a test VM and got some errors because the version numbers need to be 1.0.0 instead of 1.0. Other than that it worked flawlessly.

I do attach my docker-compose file for reference in case anybody needs it.

Thanks again for your help!

mman commented 5 months ago

@jjx- Good catch with the version numbers, I need to add some SemVer magic to automatically tag the build properly...