Tool to copy data from one influxdb to another incrementally with each run
Python 3.6+
pip install influx_rsync
(you may need to run pip
with root permission: sudo pip install git+https://github.com//.git
)
Then import the package:
import influx_rsync
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
from influx_rsync import InfluxRSync
Install and then run the following:
from influx_rsync import InfluxRSync
from influxdb import InfluxDBClient
from influx_rsync import InfluxRSync
src = InfluxDBClient(host='localhost')
dst = InfluxDBClient(host='remote.influxdb.com', verify_ssl=True, username='xxx', password='yyy')
irs = InfluxRSync(src, dst)
print(irs.sync()) # will copy whatever data in source which is newer than the latest found in destination