I do i get Backup of project with database in CE Thingsboard

341 views
Skip to first unread message

chirag Vachheta

unread,
Jan 7, 2022, 5:08:16 AM1/7/22
to Thingsboard user discussion and Q&A
Hello everyone ,

     I have install thingsboard in Ubuntu with this link https://thingsboard.io/docs/user-guide/install/ubuntu/ 
     Anyone can help me with to get backup of things board project along with database cassandra db , postgre sql and restore in future or import in other workspace .

Thanks in Advance !

Thanks and Regards 
Chirag Vachheta 

G MyIOTData

unread,
Jan 11, 2022, 11:08:28 PM1/11/22
to Thingsboard user discussion and Q&A
On the first computer, backup the database using postgres dump tool:

pg_dump thingsboard --host=localhost --username postgres -W > thingsboard.dump

Then, backup the /etc/thingsboard/conf directory:

sudo tar cvfz tb.tar.gz /etc/thingsboard/conf/*

Copy thingsboard.dump and tb.tar.gz to the new computer. On the new computer, with a fresh install of Thingsboard as per the posted instructions:

Stop Thingsboard, then:

sudo su postgres
dropdb thingsboard    # this removes the database
createdb -T template0 thingsboard
psql thingsboard -U postgres -W < thingsboard.dump

Copy the /etc config files:

cd /
sudo tar xvfz /home/ubuntu/tb.tar.gz

Start Thingsboard.

Fábio Alves

unread,
Sep 14, 2022, 10:13:19 AM9/14/22
to Thingsboard user discussion and Q&A
Thank you so much, this is exactly what I needed. You just saved my project!
Reply all
Reply to author
Forward
0 new messages