Problem with domoticz db after restoring from backup

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
abaratian
Posts: 22
Joined: Thursday 12 July 2018 20:19
Target OS: Windows
Domoticz version: 2021.1
Contact:

Problem with domoticz db after restoring from backup

Post 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?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Problem with domoticz db after restoring from backup

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
abaratian
Posts: 22
Joined: Thursday 12 July 2018 20:19
Target OS: Windows
Domoticz version: 2021.1
Contact:

Re: Problem with domoticz db after restoring from backup

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest