# Trying to upgrade influxDB v1.6.4 to v1.8.10

**URL:** <https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968>\
**Category:** General\
**Tags:** database\
**Created:** [2 November 2022 13:49 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968 "2022-11-02T13:49:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [2 November 2022 13:49 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/1 "2022-11-02T13:49:01Z")

</div>

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

```auto
# 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:

> [@How to install Influxdb on Raspberry PI?](https://discourse.nodered.org/t/how-to-install-influxdb-on-raspberry-pi/58084/9):
>
> Here is my setup for pz2w, hope it can be used. Had it running on a pzw but was too slow. runs alongside grafana and bluetooth. pi@raspberrypi:~ $ influx --version InfluxDB shell version: 1.8.10 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://rep…

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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 November 2022 14:09 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/2 "2022-11-02T14:09:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [2 November 2022 14:15 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/3 "2022-11-02T14:15:01Z")

</div>

@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 [Index of /raspbian](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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 November 2022 14:22 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/4 "2022-11-02T14:22:12Z")

</div>

> [@henkkas](#):
>
> influxdb client:  
> Installed: 1.6.4-1+deb10u1

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

> **[Upgrade to InfluxDB 1.8.x | InfluxDB OSS v1 Documentation](https://docs.influxdata.com/influxdb/v1/administration/upgrading/)**
>
> Upgrade to the latest version of InfluxDB.

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [2 November 2022 14:29 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/5 "2022-11-02T14:29:50Z")

</div>

> [@Colin](#):
>
> 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 [Index of /raspbian](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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 November 2022 14:37 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/6 "2022-11-02T14:37:08Z")

</div>

> [@henkkas](#):
>
> After that, I still have candidate on 1.6.4

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

> [@henkkas](#):
>
> But if I wipe out all of present version of influxDB, I should be able to make clean install, yes?

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

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [2 November 2022 15:16 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/7 "2022-11-02T15:16:17Z")

</div>

@Colin

> $ apt policy influxdb  
> influxdb:  
> Geïnstalleerd: 1.8.10-1  
> Kandidaat: 1.8.10-1  
> Versietabel:  
> \*\*\* 1.8.10-1 500  
> 500 [InfluxData - Package Repository](https://repos.influxdata.com/debian) buster/stable armhf Packages  
> 100 /var/lib/dpkg/status  
> 1.6.4-1+deb10u1 500  
> 500 [Index of /raspbian](http://raspbian.raspberrypi.org/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](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] [InfluxData - Package Repository](https://repos.influxdata.com/debian) $(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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 November 2022 15:24 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/8 "2022-11-02T15:24:14Z")

</div>

> [@henkkas](#):
>
> > $ 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](https://repos.influxdata.com/debian) buster/stable armhf Packages  
> > 100 /var/lib/dpkg/status  
> > 1.6.4-1+deb10u1 500  
> > 500 [Index of /raspbian](http://raspbian.raspberrypi.org/raspbian) buster/main armhf Packages
> 
> There is still some residue from v1.6.4 But I guess that is no problem?

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?

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [2 November 2022 15:28 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/9 "2022-11-02T15:28:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 November 2022 15:38 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/10 "2022-11-02T15:38:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [2 November 2022 15:52 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/11 "2022-11-02T15:52:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [2 November 2022 15:58 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/12 "2022-11-02T15:58:41Z")

</div>

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](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](https://repos.influxdata.com/debian) $(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\>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [16 November 2022 15:58 UTC](https://discourse.nodered.org/t/trying-to-upgrade-influxdb-v1-6-4-to-v1-8-10/69968/13 "2022-11-16T15:58:56Z")

</div>

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