Giter Club home page Giter Club logo

thingsboard-data-migration's Introduction

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.

thingsboard-data-migration's People

Contributors

abcthings avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

thingsboard-data-migration's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.