Import v1.x backup to v2.6

Hi there.

I do have a backup of an old installation influxdb v1.8 on raspi, generated with

influxd backup -portable /path

Now I am running a raspi v2.6 installation. Is there a way to integrate the old data in my new system? How can I “import” the files?

Thank you
Fred

should give you a good guide to migrating your data.

Antony.

Thanks Antony.

I am running a 32bit system raspi with influxDB 1.x
To upgrade I need 64bit which I am already running on my influxDB2 system.

Is there a way not to need a kernel upgrade and influxDB upgrade to get my backup data?

Fred

you can try with docker.

stop influxdb on old instance:

sudo systemctl stop influxdb

copy everthing from /var/lib/influxdb to your docker machine and map the old and the new influx data folder as volumes to the docker container:

docker run -p 8086:8086 \
  -v "./influxdb-backup:/var/lib/influxdb" \
  -v "./influxdb2-data:/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

On first start the data will be migrated from 1.x to 2.x

See also: Problem backup 1.8 restore 2.6 - #3 by stif

Hey stif!

Good idea to use docker. I had not thought of that.
Thank you very much!

Best regards

Sorry for reviving this old thread. But I’m using docker-compose
Do I need to use these commands every time i’m updating the influx docker container?

  influxdb:
      container_name: influxdb
      ports:
          - 8086:8086
      volumes:
          - /opt/influxdb:/var/lib/influxdb
          - /opt/influxdb2:/var/lib/influxdb2
      environment:
          - DOCKER_INFLUXDB_INIT_MODE=upgrade
          - DOCKER_INFLUXDB_INIT_USERNAME=user
          - DOCKER_INFLUXDB_INIT_PASSWORD=pass
          - DOCKER_INFLUXDB_INIT_ORG=org
          - DOCKER_INFLUXDB_INIT_BUCKET=bucket
      image: influxdb:2.7

or is it 1 time migrating / updating enough?
If so what would the docker-compose.yml suppose to be then?