Database backup gets failing RPi after SD-card crash

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

Moderator: leecollings

Post Reply
Gettingthere
Posts: 18
Joined: Wednesday 04 March 2015 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Database backup gets failing RPi after SD-card crash

Post by Gettingthere »

Gentlemen,

About a year ago, I've started using Domoticz on a Raspberry Pi. One of my very first scripts was an automated daily domoticz.db backup (http://www.domoticz.com/wiki/Daily_back ... ternal_hdd) on my Synology NAS. I've made some images, but the last one was from May 2015. So when my SD-card crashed last week, I got started straight away:

- got me a proper SanDisk SD-card (better than my last 'homebrand' which crashed);
- put my 9 month old image on it;
- stopped domoticz from running by 'sudo service domoticz.sh stop';
- renamed the regular domoticz.db to domoticz._db
- got started with my database update by 'gunzipping' it in a separate directory;
- and.... got into trouble.

As soon as I started unzipping my domoticz.db.gz to the regular domoticz.db, even while in the separate directory, the pi began to disconnect from WinSCP and Putty, only to reconnect after 20 seconds. And disconnect again within a few seconds. And on and on and on.
No fix seems possible.

Which is getting me to the question: does anyone have an idea about how I can use my zipped domoticz.db.gz to restore my Domoticz to its fullblown usefullness?

Thanks in advance!
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: Database backup gets failing RPi after SD-card crash

Post by nayr »

What makes you think SanDisk is proper? your dead no name was likely a rebranded SanDisk.. next time look at Samsung.

If the system is locking up and dumping you out of ssh from a simple gzip operation you still have some hardware issues..
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Robert
Posts: 16
Joined: Saturday 01 March 2014 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Database backup gets failing RPi after SD-card crash

Post by Robert »

my opinion is to make à disk image when setting up a "perfect" installation. A backup should work. Could it be that the backup has been made by an other version? I'm using all kinds of disks, you need some luck with sd cards and accept that a sd card can become corrupted. An image in combination with backup works for me. Hope you can recover your installation.


Verzonden vanaf mijn iPad met Tapatalk
Gettingthere
Posts: 18
Joined: Wednesday 04 March 2015 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Database backup gets failing RPi after SD-card crash

Post by Gettingthere »

Thanks for yer opinion Nayr, you obviously got yer own experiences... I'll see what my SanDisk will do for me. I have no clue whatever my hardware issues are, since the rest of it is working well right now.

And thanks Robert. Making images is what I'm lazy at so far, as I trusted my backups... After all: an SD-card isn't made for continuously writing. I just stopped trying my backups and used last week to restore my installation. Gotta work on images more often I reckon...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest