Upgrade guidance

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?

To transfer your data, I used Node-RED. See my post here. This method will also allow you to rename fields, tags, etc. (in case you might want to do that).

Hi Grant,
That is an interesting approach that I would never have thought of. I have a node-red container already so there is no harm in giving it a try.

The other method I am going to look at is to use the influxd backup CLI command in V1.8 using the -portable flag. This should create a portable format file. Then, in V2.x use the influx restore CLI command with the –full flag.

The V2.x restore doesn’t say that it will not handle v1.8 backups so what have I got to lose?