Trying to upgrade influxDB v1.6.4 to v1.8.10

I have used influxDB v1.6.4 on my RPI 3B+ with Debian buster until now, because it was easy to install with.

sudo apt-get install influxdb
sudo apt install influxdb-client

it works perfectly for me!

But now I have a small issue, I want to drop some fields in a measurement, and the way to do that would be with function drop(). Only this function is only available as from version 1.7 or higher. So I would like to upgrade from version 1.6.4 to version 1.8.10, which seems to be a stable version.

I uninstalled present influxDB with

sudo apt-get purge --auto-remove influxdb

But then I noticed that shell was still present when I put in

$ influx -version
InfluxDB shell version: 1.6.4

I thought, I just go ahead and install version 1.8.10 with following commands

# install influx

sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y

curl https://repos.influxdata.com/influxdb.key | gpg --dearmor | sudo tee /usr/share/keyrings/influxdb-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/influxdb-archive-keyring.gpg] https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

sudo apt update && sudo apt install influxdb -y
sudo systemctl unmask influxdb
sudo systemctl enable influxdb
sudo systemctl start influxdb
sudo systemctl status influxdb

see this post:

But I didn't succeed in that I got still conflicts with version 1.6.4, see output

$ sudo apt-get install influxdb -y
Package lists are being read... Done
Tree of requirements is being built
Status information is being read... Done
The following NEW packages will be installed:
influxdb
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
0 B/50.7 MB of archives must be retrieved.
After this operation, an additional 135 MB of disk space will be used.
(Reading database ... 164830 files and directories currently installed.)
Preparing to extract .../influxdb_1.8.10-1_armhf.deb...
Extracting influxdb (1.8.10-1) ...
dpkg: Error processing archive /var/cache/apt/archives/influxdb_1.8.10-1_armhf.deb (--unpack):
attempted overwrite of '/usr/bin/influx', which is also in package influxdb-client 1.6.4-1+deb10u1
dpkg-deb: Error: Paste subprocess was killed by signal (Broken pipe)
Errors found while processing:
/var/cache/apt/archives/influxdb_1.8.10-1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Has anyone any idea how to solve this problem?

What does
apt policy influxdb-client
show?

On a separate point, have you read the influx docs for upgrading the data from 1.6 to 1.8?

@Colin

apt policy influxdb-client

returns:

influxdb client:
Installed: 1.6.4-1+deb10u1
Candidate: 1.6.4-1+deb10u1
Version table:
*** 1.6.4-1+deb10u1 500
500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
100 /var/lib/dpkg/status

I didn't find that doc about upgrading van 1.6 to 1.8.
Only find from 1.xx to 2.xx/ But because I have Debian buster (32 bit), I cannot upgrade to 2.xx as they have stated.

That is still installed, so you need to remove it
sudo apt remove influxdb-client

$ apt policy influxdb-client
influxdb-client:
Geïnstalleerd: (geen)
Kandidaat: 1.6.4-1+deb10u1
Versietabel:
1.6.4-1+deb10u1 500
500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

After that, I still have candidate on 1.6.4

Ok, I see that doc now, indeed. But that routine is very complex for me.

But if I wipe out all of present version of influxDB, I should be able to make clean install, yes?

I don' t think you don't need the client any more. It is included with influxdb.

Yes, you only need to upgrade if you want to keep your existing database data.

@Colin

$ apt policy influxdb
influxdb:
Geïnstalleerd: 1.8.10-1
Kandidaat: 1.8.10-1
Versietabel:
*** 1.8.10-1 500
500 InfluxDB - Package Repository buster/stable armhf Packages
100 /var/lib/dpkg/status
1.6.4-1+deb10u1 500
500 Index of /raspbian buster/main armhf Packages

There is still some residue from v1.6.4 But I guess that is no problem?
It looks good, and my test project looks like running good too.

So, to make a summary of the procedure to follow, for dummy's like me:

// Update packages
$ sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y

// check status
$ apt policy influxdb

// Backup database
$ influxd backup -portable <folder_name>

// to remove old version
$ sudo apt-get purge --auto-remove influxdb

// to remove old client
$ sudo apt remove influxdb-client

// Get 1.8.10 .deb package> ```
curl https://repos.influxdata.com/influxdb.key | gpg --dearmor | sudo tee /usr/share/keyrings/influxdb-archive-keyring.gpg >/dev/null

echo "deb [signed-by=/usr/share/keyrings/influxdb-archive-keyring.gpg] InfluxDB - Package Repository $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

// Install and start service
$ sudo apt update && sudo apt install influxdb -y
$ sudo systemctl unmask influxdb
$ sudo systemctl enable influxdb
$ sudo systemctl start influxdb
$ sudo systemctl status influxdb

// check status
$ apt policy influxdb

// Restore database
$ influxd restore -portable <folder_name>

You think this is the way to go, or is there a better way?

That is just saying that 1.6.4 is available for install from the raspbian repo, but it is not installed, so is not a problem.

Did the restore from backup work ok?

Restore worked perfectly like before.

By the way, I am in the middle of making a routine in of dropping database(s) and restoring database with file selector to backups I make every night. Now that I know how easy that works.

You think that is the way to go to upgrade v1.6 to v1.8?

If it works for you that is fine. Doing it that way does it restore all the retention policies, continuous queries and so on? It won't restore any config changes you made such as where the database is, logging level etc.

Well, I don't have continuous queries, authorizations etc.I have 4 databases with standard retention policies per database they where kept. I kept it all as simple as possible. I am no expert.

With many thanks to @Colin, a solution to the upgrade from 1.6.4 to v1.8.10.

Remarks from @Colin,
Doing it that way does it restore all the retention policies, continuous queries and so on? It won't restore any config changes you made such as where the database is, logging level etc.

So, to make a summary of the procedure to follow, for dummy's like me:

// Update packages
$ sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y

// check status
$ apt policy influxdb

// Backup database
$ influxd backup -portable <folder_name>

// to remove old version
$ sudo apt-get purge --auto-remove influxdb

// to remove old client
$ sudo apt remove influxdb-client

// Get 1.8.10 .deb package> ```
curl https://repos.influxdata.com/influxdb.key | gpg --dearmor | sudo tee /usr/share/keyrings/influxdb-archive-keyring.gpg >/dev/null

echo "deb [signed-by=/usr/share/keyrings/influxdb-archive-keyring.gpg] InfluxDB - Package Repository $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

// Install and start service
$ sudo apt update && sudo apt install influxdb -y
$ sudo systemctl unmask influxdb
$ sudo systemctl enable influxdb
$ sudo systemctl start influxdb
$ sudo systemctl status influxdb

// check status
$ apt policy influxdb

// Restore database
$ influxd restore -portable <folder_name>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.