Page 1 of 1

Backing up Blockly

Posted: Monday 13 April 2020 22:49
by alarm_guy1
Hi guys,

I had a system crash last week, my own doing (I have a POE converter ethernet & 5v, I powered down the Switch before shutting down the Pi) I managed to re-instate from a backup, but I feel there are some further underlying issues.

My system has regularly started just freezing, loosing nodes.
My plan is to virtually start from scratch new Pi new SD and install
however I have several Blocklys, and DZvents, I can find these, but not the blockly.

I didnt want to restore from my backup just incase there is an issue as we have been struggling all week and it was freezing this morning, the was wasnt happy.


Cheers

Re: Backing up Blockly

Posted: Monday 13 April 2020 23:04
by waaren
alarm_guy1 wrote: Monday 13 April 2020 22:49 ...However I have several Blocklys, and DZvents, I can find these, but not the blockly.
The Blockly scripts are stored in the database. dzVents script written in the internal editor also but they are exported to the OS files-system.
Tables you want to preserve are EventMaster and EventRules.
Some time ago I posted a bash script here to export Blockly scripts from the database to the os file level.

Re: Backing up Blockly

Posted: Monday 13 April 2020 23:10
by alarm_guy1
Thankyou, I will take a look.
Thanks for the quick reply

Re: Backing up Blockly

Posted: Monday 13 April 2020 23:35
by alarm_guy1
Cheers, just figured out getting it working, only took 29 mins, I must be improving.

However I get this error
created /home/pi/Downloads/blockly/Lounge Light Off Alarm set.xml
blockly.sh: 20: blockly.sh: [[: not found
created /home/pi/Downloads/blockly/Death_Star_After_Midnight.xml

There are files in my /home/pi/Downloads/blockly

Re: Backing up Blockly

Posted: Tuesday 14 April 2020 0:40
by waaren
alarm_guy1 wrote: Monday 13 April 2020 23:35 However I get this error
blockly.sh: 20: blockly.sh: [[: not found
You can change [[ to [ and ]] to ] and try again. Some Debian versions do not like the double brackets.

Re: Backing up Blockly

Posted: Tuesday 14 April 2020 9:26
by alarm_guy1
Cheers, i will take a look.

Thankyou for your assistance...