Conflicting packages - not installing influxdb2

An attempt to upgrade to version 2.0.3 results in an error.

dpkg: error processing archive influxdb2_2.0.3_amd64.deb (–install):
conflicting packages - not installing influxdb2
Errors were encountered while processing:
influxdb2_2.0.3_amd64.deb

The origin of the error is clear to me from here InfluxDB v2.0 release notes | InfluxDB OSS 2.0 Documentation
But I cannot figure out how to get around it - there is little experience in Linux.
Removing the old package and installing a new one leads to a proposal to reconfigure the system.
Help me update please.

Hello @vshaev,
I’m not sure. Have you tried influx upgrade --v2-config-path "~/<path different from old path>"
where old path ~/.influxdbv2/

Thanks.

Error: unknown flag: --v2-config-path

Hi @vshaev , I have this same issue, did you find a way to upgrade ?

No, I couldn’t. Did a clean install.

I could upgrade it successfully on a Ubuntu 20.04 with these steps:

# Backup data / you could avoid the param -t if you already have a proper influx config
$ influx backup /path/to/backup/directory -t [admin_admin]  

# Back of data directories , just in case
$ sudo cp -a /var/lib/influxdb/.influxdbv2/ /path/to/backup/data_directory

# Stop service
$ sudo systemctl stop influxdb

# Remove previous version - Do not use param --purge
$ sudo dpkg -r influxdb

# Install new version
$ sudo dpkg -i influxdb2_2.0.3_amd64.deb

# Move data directories to new version location
$ sudo mv /var/lib/influxdb/.influxdbv2/engine /var/lib/influxdb/engine
$ sudo mv /var/lib/influxdb/.influxdbv2/influxd.bolt /var/lib/influxdb/influxd.bolt

# Start service
$ sudo systemctl sart influxdb
1 Like

Brilliant - thank you.