Page 1 of 1

Problem with domoticz db after restoring from backup

Posted: Saturday 18 May 2019 13:04
by abaratian
Hi
I made a backup from old windows server and restored on new one. After restore my events don't work any more and i get the following in log

Code: Select all

2019-05-18 15:29:10.733 Status: dzVents: Error (2.4.19): There was a problem writing the storage values
2019-05-18 15:29:10.734 Status: dzVents: Error (2.4.19): ...ram Files (x86)\Domoticz\dzVents\runtime\persistence.lua:24: C:\Program Files (x86)\Domoticz\scripts\dzVents\data/__data_Script #2.lua: Permission denied
2019-05-18 15:29:10.734 Status: dzVents: Info: ------ Finished Script #2
2019-05-18 15:29:10.567 Error: Error opening url: http://172.16.0.30:8086/write?db=test&u=test&p=123test
2019-05-18 15:29:54.768 (Xiaomi Gateway) Temp (Downstairs Storage Temperature)
2019-05-18 15:29:55.080 (Xiaomi Gateway) Temp (Downstairs Storage Temperature)
The interesting part is that my IPs are (and have been) from the 192.168... segment. This is a very simple setup. only two dzvents events and a xiaomi gateway and couple of temp sensors.

what can the problem be?

Re: Problem with domoticz db after restoring from backup

Posted: Sunday 19 May 2019 13:15
by waaren
abaratian wrote: Saturday 18 May 2019 13:04 I made a backup from old windows server and restored on new one. After restore my events don't work any more and i get the following in log

Code: Select all

2019-05-18 15:29:10.733 Status: dzVents: Error (2.4.19): There was a problem writing the storage values
The interesting part is that my IPs are (and have been) from the 192.168... segment. This is a very simple setup. only two dzvents events and a xiaomi gateway and couple of temp sensors.
what can the problem be?
From what I see in the logfile, it looks like there are 1 or more dzVents scripts stored in the database. At domoticz startup or when a script is modified these scripts will be written to the OS level. (here to C:\Program Files (x86)\Domoticz\scripts\dzVents\generated_scripts\Script #2.lua
When you look in that script you will see something in the data = section (near the beginning of the script) and that part tries to write something to C:\Program Files (x86)\Domoticz\scripts\dzVents\data/__data_Script #2.lua but fail because of a permission problem.
Most likely you will find in that script also the domoticz.openURL commmand trying to access 172.16.0.30:8086 (influx ?)

The problem with your other events not working is related. They are not in the restored database.

Re: Problem with domoticz db after restoring from backup

Posted: Tuesday 21 May 2019 6:23
by abaratian
waaren wrote: Sunday 19 May 2019 13:15 From what I see in the logfile, it looks like there are 1 or more dzVents scripts stored in the database. At domoticz startup or when a script is modified these scripts will be written to the OS level. (here to C:\Program Files (x86)\Domoticz\scripts\dzVents\generated_scripts\Script #2.lua
When you look in that script you will see something in the data = section (near the beginning of the script) and that part tries to write something to C:\Program Files (x86)\Domoticz\scripts\dzVents\data/__data_Script #2.lua but fail because of a permission problem.
Most likely you will find in that script also the domoticz.openURL commmand trying to access 172.16.0.30:8086 (influx ?)

The problem with your other events not working is related. They are not in the restored database.
Thanks for the info.
Ultimately the problem was with bad permissions on "C:\Program Files (x86)\Domoticz\scripts\dzVents\generated_scripts" which prevented dzvents from saving the scripts. Changing permissions and re-saving the events solved everything.