Subscription from InfluxDB in Rpi to endpoint InfluxDB in Personal Computer

Hi all,

I am collecting data on InfluxDB in Raspberry Pi. The memory of SD card on Rpi is less so I would like my data to transfer to My PC. I have successfully used InfluxDB subscription to send the data to my InfluxDB database in PC. However, if the connection between Rpi and PC fails, the time series data was stored in Rpi but was unable to save in PC for the failed period.
I would like to know the possible solution in which the influxDB in PC retrieve the lost connection time series data from Rpi once the connection re-established.

Thanks in advance.

1 Like

I had the same kind of requirements in my head a few years back (Delayed replication to an InfluxDB available intermittently). I might be wrong but I don’t believe it is implemented (at least the community version).

You can always try to perform checks that both your DB are in sync with a tool of yours that would run periodically and keep tabs on what is already synced or not. Then export the missing time range and import it on your PC.

The data collection you do write directly into InfluxDB? Do you query the InfluxDB running on your Pi? If not, you could consider ditching InfluxDB from the Pi and collect into anything that has a disk persistence (like a message queue implementation of your choice for example). Then when the link Pi-PC is working, the broker can forward to the PC (or your PC can pull depending on networking limitations) and it is a matter of having an adapter to get the Pi message and insert it into InfluxDB on your PC. Telegraf can probably be that adapter if you pick something compatible with one of its input plugins.

Hi all, Do you have any solution for this matter? Thanks.