Problem backup 1.8 restore 2.6

Hello dear Influx Community,

I have 2 InfluxDB instances on different machines (one Openhabian installatilon on CM4 and one docker instance) and having problems migrating the data.

Instance 1 (openhabian on raspberry4)

influx --version
InfluxDB shell version: 1.8.10
influxd backup -portable .
2023/03/07 11:57:42 backing up metastore to meta.00
2023/03/07 11:57:42 No database, retention policy or shard ID given. Full meta store backed up.
2023/03/07 11:57:42 Backing up all databases in portable format
2023/03/07 11:57:42 backing up db=
2023/03/07 11:57:42 backing up db=openhab rp=autogen shard=1 to openhab.autogen.00001.00 since 0001-01-01T00:00:00Z
2023/03/07 11:57:42 backing up db=openhab rp=autogen shard=2 to openhab.autogen.00002.00 since 0001-01-01T00:00:00Z
2023/03/07 11:57:42 backing up db=openhab rp=autogen shard=3 to openhab.autogen.00003.00 since 0001-01-01T00:00:00Z
2023/03/07 11:57:42 backup complete:
2023/03/07 11:57:42 	20230307T105742Z.meta
2023/03/07 11:57:42 	20230307T105742Z.s1.tar.gz
2023/03/07 11:57:42 	20230307T105742Z.s2.tar.gz
2023/03/07 11:57:42 	20230307T105742Z.s3.tar.gz
2023/03/07 11:57:42 	20230307T105742Z.manifest

Instance 2 (docker)

# copy backup directory
sudo docker cp influxdb-backup openhab-influxdb-1:/influxdb-backup
# enter docker container
sudo docker exec -it openhab-influxdb-1 bash
# show influx version
root@35c97fc0e358:/# influx version
Influx CLI 2.6.1 (git: 61c5b4d) build_date: 2022-12-29T15:41:09Z
# show backup folder contents
root@35c97fc0e358:/# ls influxdb-backup/
20230307T105742Z.manifest  20230307T105742Z.meta  20230307T105742Z.s1.tar.gz  20230307T105742Z.s2.tar.gz  20230307T105742Z.s3.tar.gz
# restore influxdb
root@35c97fc0e358:/# influx restore /influxdb-backup
Error: unable to open boltdb: open /influxdb-backup: is a directory
# another try
root@35c97fc0e358:/# influx restore /influxdb-backup/20230307T105742Z.manifest 
Error: no backup manifests found at "/influxdb-backup/20230307T105742Z.manifest"

How can i import the backup in my docker instance? Is it possible at all? What i am missing?

Thanks for any hints,
Stif

dont know why my former post was marked as spam by askimet and hided the post for 2 days :thinking:
anyway i bump this thread one time to be on top of the posts at least once…

i have solved it now. 3 days after me another user had a similar question: Import v1.x backup to v2.6 - #3 by FredAnna and the answer from user @Pooh pointed me to the right direction.

With Info from Upgrade from InfluxDB 1.x to 2.6 with Docker | InfluxDB OSS 2.6 Documentation i could upgrade my data from 1.x to 2.x

docker run -p 8086:8086 \
  -v influxdb:/var/lib/influxdb \
  -v influxdb2:/var/lib/influxdb2 \
  -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
  -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
  -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
  -e DOCKER_INFLUXDB_INIT_ORG=my-org \
  -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
  influxdb:2.6

1 Like