Failed to restore the 3 domoticz db-files

Hello,

I’m (newbie…) working with a Raspberry Pi 3b/Buster/Domoticz and recently installed Duplicati (all latest versions). I followed the instructions at Backup Domoticz with Duplicati - SANCLA. Meanwhile several automatic backups were made at my Google Drive, no error messages.

However when I restore (tested on different backups) at the end I always get error that the (same) 3 files (domoticz.db**) failed to restore:

“1 Dec 2020 10:03 - Operation: Restore

Time Start 2020-12-01 10:01:23 End 2020-12-01 10:03:20 Duration 00:01:57

Source Files Examined 0 (0 bytes) Opened 0 (0 bytes) Added 0 (0 bytes) Modified 0 (0 bytes) Deleted 0

Restored Files 11 (664.00 KB) Restored Folders 0 Restored Symlinks 0 Warnings 1

2020-12-01 10:03:18 +01 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: “/home/pi/domoticz/domoticz”, message: Win32 IO returned 50. Path: /home/pi/domoticz/domoticz

Errors 3

2020-12-01 10:03:20 +01 - [Error-Duplicati.Library.Main.Operation.RestoreHandler-RestoreFileFailed]: Failed to restore file: “/home/pi/domoticz/domoticz.db”. File hash is XjOSg3MXUiNG+KqQIvtk/KugDkmrIdRQsWpoPqXCqUU=, expected hash is 7B09lbOBX1MTWhwK4tuDFJ6SBGMX+nCHtwOmypC+r9Q=

2020-12-01 10:03:20 +01 - [Error-Duplicati.Library.Main.Operation.RestoreHandler-RestoreFileFailed]: Failed to restore file: “/home/pi/domoticz/domoticz.db-shm”. File hash is lbTgyHWM10FcygaP4AjWyG3iq5AUbYNbkadt6GPI11E=, expected hash is 5bFe2TMf7nLMcCY5SB+idQpUucMzEeLuzr9DBLyvSYQ=

2020-12-01 10:03:20 +01 - [Error-Duplicati.Library.Main.Operation.RestoreHandler-RestoreFileFailed]: Failed to restore file: “/home/pi/domoticz/domoticz.db-wal”. File hash is NttV/P8RZ85wDSDNcJIUilAU8d5zpwqscv02/dnmyug=, expected hash is vTtFhCUY1f4c135xceUziD51fKA1HGi95LJ7PjxW/KA=”

What could be wrong??

Thanks, Theo.

You might have restored into a running domoticz’s DB, which would possibly break it.
First thing to try is a restore to a different folder to see if that passes the restore tests.
They verify files are as they were when backed up. They won’t be if they get changed.

Restoring files from a backup has pictures. Try “Pick location”, not “Original location”.

Ideally, when backing up active databases, they should be stopped for their backup…
Possibly that’s what went wrong, but I’m more suspecting active DBs during restore.
Can’t start/stop using sudo service commands has some methods to stop and start.

Indeed, the problem was the running domoticz’s DB.
Before restoring I stopped the running Domoticz with “sudo service domoticz.sh stop”
Then the restore, no errors
Then restart Domoticz with “sudo service domoticz.sh start”

All works fine now, thank you !

(special, that I am apparently the first to have and report this problem?)

Best regards, Theo.