Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AbCthings/thingsboard-data-migration
This script performs data migration between two different instances of ThingsBoard, regardless of the technology used for the database.
https://github.com/AbCthings/thingsboard-data-migration
Last synced: about 2 months ago
JSON representation
This script performs data migration between two different instances of ThingsBoard, regardless of the technology used for the database.
- Host: GitHub
- URL: https://github.com/AbCthings/thingsboard-data-migration
- Owner: AbCthings
- License: gpl-3.0
- Created: 2019-06-26T12:29:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-18T09:39:14.000Z (about 2 years ago)
- Last Synced: 2024-08-05T14:15:26.725Z (5 months ago)
- Language: Python
- Homepage:
- Size: 74.2 KB
- Stars: 24
- Watchers: 1
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-thingsboard - thingsboard-data-migration - data migration between two instances of ThingsBoard (Tools)
README
# thingsboard-data-migration
This tool performs data migration between two different instances of ThingsBoard, regardless of the technology used for the database.
It also allows the transfer of data between two different devices of the same ThingsBoard instance.
The tool exploits the native ThingsBoard HTTP APIs to retrive data, and the ThingsBoard MQTT broker to send data.# How to use
usage: migration-script.py [-h] [-c CONFIGURATION] [-m MODE] -i
INITIALTS -f FINALTS -s SOURCEDEVICEID -t
TARGETDEVICETOKEN -k TIMESERIESKEY
Command example:
python migration-script.py -m both -c ./migrationConf.yml -i 1546361494000 -f 1578415926000 -s dc872480-85e5-11e9-acf5-fb7ea3e0493d -t phhQnVa4nSKjyJ1QMwtx -k data_key# Help
python migration-script.py --help# Operating modes
You can perform three different operations with this script:
1) Fetch data via HTTP RESTful API (from source ThingsBoard instance) and send via MQTT (to target ThingsBoard instance) --> use argument "-m both", default behavior
2) Fetch data via HTTP RESTful API (from source ThingsBoard instance) and save in local file --> use argument "-m fetch"
3) Fetch data from local file and send via MQTT (to target ThingsBoard instance) --> use argument "-m send"*** IMPORTANT ***
You shall always pass ALL the arguments, even if not used within the chosen operating mode. Next version of this script will include an automated argument check to allow the user specify only the strictly necessary ones.