This script performs data migration between two different instances of ThingsBoard, regardless of the technology used for the database.
usage: migration-script.py [-h] [-c CONFIGURATION] [-m MODE] -i
INITIALTS -f FINALTS -s SOURCEDEVICEID -t
TARGETDEVICETOKEN -k TIMESERIESKEY
python migration-script.py --help
You can perform three different operations with this script:
- Fetch data via HTTP RESTful API (from source ThingsBoard instance) and send via MQTT (to target ThingsBoard instance) --> use argument "-m both", default behavior
- Fetch data via HTTP RESTful API (from source ThingsBoard instance) and save in local file --> use argument "-m fetch"
- Fetch data from local file and send via MQTT (to target ThingsBoard instance) --> use argument "-m send"