Unable to restore backup?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Naki
Posts: 3
Joined: Saturday 18 February 2017 11:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Unable to restore backup?

Post by Naki »

I'm running Domoticz on a Raspberry Pi with a few z-wave and 433MHz devices. Earlier this week the sdcard broke down. But I was using rsync to make a copy of the filesystem every 6th hour so I thought it would be ok. However, I'm unable to get it to work the way it did.

I've done a clean install of latest Raspbian and Domoticz(to /home/pi/domoticz). After this I was able to access Domoticz and it was completely empty as expected.

I then tried to stop it and copy domoticz.db from my backup. But when restarting it was still completely empty. Even tried another browser.

I then tried to stop it and copy the entire domoticz-directory from my backup. But it was still empty when I started again.

Is it time to assume my backup is busted or is there some additional steps that needs to be don?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Unable to restore backup?

Post by waaren »

Naki wrote: Thursday 22 November 2018 22:41 I'm running Domoticz on a Raspberry Pi with a few z-wave and 433MHz devices. Earlier this week the sdcard broke down. But I was using rsync to make a copy of the filesystem every 6th hour so I thought it would be ok. However, I'm unable to get it to work the way it did.
I've done a clean install of latest Raspbian and Domoticz(to /home/pi/domoticz). After this I was able to access Domoticz and it was completely empty as expected.
I then tried to stop it and copy domoticz.db from my backup. But when restarting it was still completely empty. Even tried another browser.
I then tried to stop it and copy the entire domoticz-directory from my backup. But it was still empty when I started again.
Is it time to assume my backup is busted or is there some additional steps that needs to be don?
Would be worthwhile to look directly in your backup database to see what is in there. I use sqlite3 on the RPI or SQLite expert on my W10 to do that but many other tools are available.
All hardware can be found in the table Hardware and all devices should be in the table DeviceStatus
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Naki
Posts: 3
Joined: Saturday 18 February 2017 11:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Unable to restore backup?

Post by Naki »

waaren wrote: Friday 23 November 2018 6:44 Would be worthwhile to look directly in your backup database to see what is in there. I use sqlite3 on the RPI or SQLite expert on my W10 to do that but many other tools are available.
All hardware can be found in the table Hardware and all devices should be in the table DeviceStatus
Thanks! Tried it now and got

Code: Select all

sqlite> .open /home/pi/domoticz/domoticz.db
sqlite> .tables
Error: database disk image is malformed
But after running

Code: Select all

sqlite3 domoticz.db ".dump" | sqlite3 new_domoticz.db
It seems like everything is back again.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest