saltypretzel
saltypretzel

Reputation: 145

save/load thingsboard configuration

Is it possible to somehow serialize current Thingsboard (let's call it TBoard) configuration, save it and than latter load saved configuration on TBoard startup. I am specifically interested in loading device profiles, rule chains, and dashboards. I want to save configuration together with my project in git repository so than latter I could just use docker-compose to start multiple services from project (let's call them sensors) and single TBoard instance with saved configuration which will be used for collecting telemetry from sensors and drawing dashboards. Another reason for saving configuration is what happens if for some reason TBoard container crashes or somehow get corrupted so it can't be started again, would I have to click on the things again in order to create all device profiles, dashboards, configure rule chains ... etc etc ... ?

Upvotes: 1

Views: 372

Answers (1)

JacksonB
JacksonB

Reputation: 369

Regarding this line

I am specifically interested in loading device profiles, rule chains, and dashboards. I want to save configuration together with my project in git repository

I have just recently implemented version control for my Thingsboard deployment. The way i am doing it is with the python REST client.

I have written functions to export all dashboards/data converters/integrations/rule chains/widgets into json files which I save into a github repository.

I have also written the reverse script to push the stored files to a fresh environment, essentially "flashing" it. Surprisingly, this works perfectly.

I have an idea to publish this as a package, but it's something I've never done before so I'm unsure if I will get to it.

Just letting you know that it is definitely possible to get source control operational via the API.

Upvotes: 1

Related Questions