Please use template to report bugs and problems. Post here your questions when not sure where else to post Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.
When I update my domoticz the DB is reset to factory, this has happen several times.
I thought was duet to the db files has root permissions so I changed them to the default pi user but same happen.
Lucky I have hourly backup of the db so I could always restore.
Before:
After
This time I did a backup of the db file before I updated.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
When you import a database backup succesfully from webgui and then update Domoticz from webgui it should (Edit:) not start with an empty database. Then you have to check your permissions.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
waltervl wrote: ↑Tuesday 06 May 2025 0:01
When you import a database backup succesfully from webgui and then update Domoticz from webgui it should (Edit:) not start with an empty database. Then you have to check your permissions.
I restored the db using console.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
pi@zwave2:~/domoticz $ bash --verbose -c ./updatebeta
./updatebeta
Stopping Domoticz...
Making backup of current installation...
rm: cannot remove 'backups/domoticz_backup_20250426_233138:': No such file or directory
rm: cannot remove 'plugins': Is a directory
rm: cannot remove 'backups/domoticz_backup_20250403_132204:': No such file or directory
rm: cannot remove 'www': Is a directory
rm: cannot remove 'Config': Is a directory
rm: cannot remove 'scripts': Is a directory
rm: cannot remove 'plugins': Is a directory
rm: cannot remove 'dzVents': Is a directory
rm: cannot remove 'ozwcp.poll.XXXXXX.xml': No such file or directory
rm: cannot remove 'updatebeta~': No such file or directory
Output file: backups/domoticz_backup_20250507_202330.tar.gz
Backup finished...
Downloading latest beta version...
Checking file integrity...
Installing new version...
...................................
Starting Domoticz... (please standby...)
Done...
pi@zwave2:~/domoticz $ ls -all
total 13296
drwxr-xr-x 8 pi pi 4096 May 7 20:24 .
drwxr-xr-x 22 pi pi 4096 May 7 20:22 ..
drwxrwx--- 17 root root 4096 May 7 20:23 backups
drwxr-xr-x 124 pi pi 4096 Feb 26 15:25 Config
-rwxr-xr-x 1 pi pi 12285484 May 5 09:46 domoticz
-rw-r----- 1 root root 4096 May 7 20:24 domoticz.db
-rw-r----- 1 root root 32768 May 7 20:24 domoticz.db-shm
-rw-r----- 1 root root 1067112 May 7 20:24 domoticz.db-wal
-rw-r--r-- 1 pi pi 5996 Dec 25 09:57 domoticz.sh
drwxr-xr-x 4 pi pi 4096 Nov 29 2023 dzVents
-rw-r--r-- 1 pi pi 123003 May 5 09:34 History.txt
-rw-r--r-- 1 pi pi 35147 Nov 29 2023 License.txt
drwxr-xr-x 10 pi pi 4096 Nov 29 2023 plugins
drwxr-xr-x 9 pi pi 4096 Jan 5 15:15 scripts
-rw-r--r-- 1 pi pi 3908 May 5 08:32 server_cert.pem
-rwxr-xr-x 1 pi pi 1810 Jan 2 2024 updatebeta
-rwxr-xr-x 1 pi pi 1830 Jan 2 2024 updaterelease
drwxr-xr-x 14 pi pi 4096 Mar 9 09:07 www
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
gizmocuz wrote: ↑Thursday 08 May 2025 12:01
There is definitely something wrong with your setup/folder rights
As you can see, it gives lots of remove errors, which should not be there.
Please have a look at the updatebeta script, there are only 2 'rm' commands executed
1, it deletes all backups older then the latest 5
2, it deletes the downloaded (update) archive
As you already said, you mounted something... My advise is, leave everything at default, and then test.
I am quite sure it has something to do with that mount, it should for sure not remove these folders !
Domoticz vacuums the database when making a backup (from the settings page), it also archives/compressed the current database
This setup have been working for years, why now ?
I mounted the backups folder and it's excluded from the TAR command.
the error comes from that I untared a backup file. So the script tried to remove the untared folder.
I cleaned up the backup folder so only back folders(hourly/daily/monthly) and the compressed backup file and now the update beta
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
No idea why it is not working now, nothing has been changed in this process, and you mentioned you had problems before.
Now that you cleaned up your backup folder, does everything work correctly?
If not, could you stop the domoticz service, unmount the backup folder, just leave it as a normal folder, with normal rights
start domoticz, all should still work, then execute the updatebeta script inside the Domoticz folder
It should update, and your database should not be touched!
(The update process does not touch your database)
gizmocuz wrote: ↑Friday 09 May 2025 8:37
No idea why it is not working now, nothing has been changed in this process, and you mentioned you had problems before.
Now that you cleaned up your backup folder, does everything work correctly?
If not, could you stop the domoticz service, unmount the backup folder, just leave it as a normal folder, with normal rights
start domoticz, all should still work, then execute the updatebeta script inside the Domoticz folder
It should update, and your database should not be touched!
(The update process does not touch your database)
Yes, the update works again after I cleaned up the backup folder.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices