Access old influxdb2 data on usb drive

sorry for the Newby question.

Previous Influxdb2 ran on jetson nano, which crashed, and now does not boot completely. The desktop starts, but Influxdb2 service does not. This is on SDcard1.

I used a second SDcard (SDcard2) and installed InfluxDB2 , which runs perfectly now. Data collection all good.

My question is : how can I get the InfluxDB2 data from SDcard1 ? I have mounted it as USBdrive (in directory: /media/SDcard1), and can see all files, including the old InfluxDB2 files.

all suggestions welcome

Andre

HI @AndreFvdMerwe

Just to be clear, the data on SDCard1 is all intact, and you want to ‘merge’ it into the new InfluxDB instance running on SDCard2, correct?

I have used Node-RED to 1) query the data from Source1, and 2) insert the captured data into a new InfluxDB instance. Your dilemma sounds similar, so I think this would work. Here’s how I did it (I was converting v1 to v2, but it could easily be changed to do v2 to v2).

Thank you for your advice.

However, I did manage to recover the data using the following method (in Linux):

  1. create a new (empty) instance of Influxdb2 on another device - in my case a RPi5.
  2. mount the old SDcard on the RPi5 as a USB drive. The contents of the old SDcard is now accessible on directory media/oldSDcard
  3. sudo copy the directory and contents of media/oldSDcard/var/lib/influxdb/ to var/lib/influxdb . command line “ sudo cp media/oldSDcard/var/lib/influxdb/ var/lib/influxdb/ -a “ (may be different for your OS)
  4. reboot the RPi5
  5. influxdb now opens the old database
  6. transfer the contents to the influxdb my main device (JetsonNano) by backup / restore each bucket.

hope my process is clear and helps someone else ?

2 Likes