Upgrade influx 1.8.10 to 2.6 -Empty retention policy, no shards found-

Hello :slight_smile:

My OS is rasp. Bullseye 64 bit
I tried to upgrade influxdb 1.8.10 to 2.6 without success My v1 database has not been tranfered to 2.6.

Here is a log excerpt {"level":"info","ts":1672221160.0119205,"caller":"upgrade/database.go:223","msg":"Computed disk space","free":"241 GB","required":"412 MB"} {"level":"info","ts":1672221163.3943026,"caller":"upgrade/database.go:51","msg":"Upgrading databases"} {"level":"info","ts":1672221163.4196975,"caller":"upgrade/database.go:101","msg":"Creating mapping","database":"iobroker","retention policy":"autogen","orgID":"eade2635eee38ce5","bucketID":"535f3b59ef564778"} {"level":"warn","ts":1672221163.4262733,"caller":"upgrade/database.go:158","msg":"Empty retention policy, no shards found","source":"/var/lib/influxdb/data/iobroker/autogen"} {"level":"info","ts":1672221163.4425917,"caller":"upgrade/database.go:101","msg":"Creating mapping","database":"iobroker","retention policy":"global","orgID":"eade2635eee38ce5","bucketID":"6f63b2de2760211b"} {"level":"info","ts":1672221180.7800333,"caller":"upgrade/database.go:195","msg":"Database upgrade complete","upgraded_count":1} {"level":"info","ts":1672221180.7802277,"caller":"upgrade/security.go:45","msg":"Upgrading 1.x users"} {"level":"info","ts":1672221180.7944946,"caller":"upgrade/security.go:115","msg":"User upgrade complete","upgraded_count":1} {"level":"warn","ts":1672221180.7946594,"caller":"upgrade/upgrade.go:483","msg":"1.x users were upgraded, but 1.x auth was not enabled. Existing clients will fail authentication against 2.x if using invalid credentials"} {"level":"info","ts":1672221180.7947352,"caller":"upgrade/upgrade.go:488","msg":"Upgrade successfully completed. Start the influxd service now, then log in","login_url":"http://localhost:8086"}

The problem seems to be ‘Empty retention policy, no shards found’.

What went wrong here? Maybe someone can help.

Hello @Heik,
I actually recommend holding off on upgrading to 2.x. Instead I’d wait for 3.x OSS to release later this year.
It offers significant performance benefits and is centered around interoperability so you don’t have to learn Flux only to have to rewrite your queries again. Instead you can use InfluxQL and SQL with 3.x OSS.

InfluxDB 3.0 is up to 45x Faster for Recent Data Compared to InfluxDB Open


In this post, we look at recent benchmarks comparing InfluxDB 3.0 to InfluxDB Open Source (OSS) 1.8. influxdb

Thanks for the tip Anaisdg, maybe I will do it one day, however

I managed to upgrade to influxdbv2.7 end of May this year and all works quiet good so far. But I have now one big problem, the size consumed by the 2.7 database.

I did make an backup of my 1.8 influx database, the size was 385 MB after more then 2 years of use. Now 3 months later a v2 backup has 23,5 GB (08-21-2023) or 25 GB (08-26-2023) and today 29 GB. It grows by a few hundred MB every day.

When I do a backup the console shows “Backing up TSM for shard xx” Most of the shards are very small but some are very very big.

My question is how I find out which measurements consume so much space and why or what axactly is a shard? I do log just data for weather conditions or smart home datapoints nothing which could consume so much memory.

I did not change anything else as to to just update to influx 2.7 and then importing the 1.8 database.

Thanks for any help in advance!