I have been using InfluxDB 1.8 for a while now. I use a container version along with Grafana, MQTT and Python applications. I am collecting real-time data for energy monitoring (temps, PV panels etc).
It all works well but version 1.8 is no longer updated so an upgrade to V2.X is a good idea.
I have read about the upgrade command and it does have risks which could stop my systems and cause some grief. From the forums it doesn’t always work 100% s there is a risk.
As I do not currently use any log-in security my applications will all need updating to use API keys. As there is only one person doing this work I can foresee a lot of candle burning.
I have a new application to add to the stack and I have to decide if I add it to the V1.8 database system and then upgrade later or wait until I have a 2.X system running.
This is my idea…
Create a V2.X InfluxDB system in a container but change the port to something like 7086. This will allow me to run two databases on the same host address without conflicts with existing apps. I could use a different host address but the same port. Docker allows you to do this but changing the port is much easier.
Then write my new app to use V2.X. After acceptance testing then, one by one, transfer the updated apps to the new database. The transfer of the applications only has one problem - how do I copy the data from the old database to the new?
Most of the databases are around 200MB with the exception of Docker metrics which are 5GB and do not need to be kept anyway. Can I copy the individual database files across and then run update on them one at a time or is update a whole system process only?
There are backup and restore commands in V2.X and V1.8 but can a V1.8 backup be restored to a V2.X database? The documentation does not say yes or no.
Will my basic strategy work or is the V 2.X update process the best way, albeit with some real-time data lost while apps etc are updated?