Announcement

Collapse
No announcement yet.

What to backup from a Pi's SD card before reinstalling?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What to backup from a Pi's SD card before reinstalling?

    Hi All,

    I've been running HS3-Pi-3 on a Pi-3 without any issues for the last 3 months.

    I've got a Z-wave stick on there, half a dozen z-wave thermostats, a couple of z-wave sockets, light switches etc. and a bunch of rules & events.

    This evening I discovered it wasn't responding... myhomeseer couldn't connect and I couldn't get a web page response direct from the Pi's IP address. I plugged an HDMI cable into the Pi and saw a lot of "SQL Exception updating ZWave Scene record in the database: database disk image is malformed" errors on the screen.

    For some reason I couldn't ssh into the Pi (my bad I think... the password I had didn't work) and I had to pull the power. Of course now when I power up, I get a kernel panic and the Pi won't boot (Pis seem to be so much more fragile in that regard than my Ubuntu machines!).

    So... my plan is to reinstall from a fresh image. But I'd like to save myself the trouble of removing/re-adding all the devices, setting up all my rules etc again. No, I don't believe I have any sort of remotely saved backup (this is the kind of pain that helps us learn, right?)

    I have the Pi's SD card in a reader connected to my PC and so have access to all the partitions - SETTINGS, boot & root. Can I save something from here to restore later and get all my data back? /home/homeseer looks like it has some general app configuration but nothing meaty - I'm presuming most of the device and event information is in the SQL database? (Although, given that it was throwing SQL errors before it died, maybe that won't help)

    Any suggestions?

    Thanks!

    #2
    So... partially solved.

    The thing I was fearing the most was wandering around the house manually removing each device from the previous network and then including them into the new network (especially as that involves emptying some cabinets so they could be moved so I could reach the button on the socket hidden behind them - why do you think I automated that socket!).

    Having reinstalled the Pi from fresh and done the dance to get the Aeotec Z-wave stick working correctly, I noticed that the stick already knew about the nodes on the network and some googling showed me how to import them back into Homeseer.

    Plug-ins->Z-Wave->ControllerManagement, expand the interface, choose "import Node Info from Controller and Scan Devices" from the blank "Actions" dropdown - and I had all my nodes back. I'm sure that's all well-known to most of you

    Anyway, an hour to work out which of the identical thermostats & switches were which and label them accordingly has got my basic functionality back up & running. I'll spend an hour or two rewriting all my events from scratch tomorrow and remember to take a backup this time. I think lessons learned the hard way are the ones that stick lol

    It looks to me like the ZIP file generated at Tools->Setup->Configuration->Backup/Restore->BackupConfig is probably a full system backup (I see it contains Zwave database files) so I think I'm good.

    Oh, and I did find the damn ssh password in the end... misfiled in my passwords app but obviously too late by the time I found it.

    Comment


      #3
      Simplest thing to do is take an image of your working HG SD card. If your system crashes you can restore that image to another SD card. In fact keep a second imaged card on hand so all you need to do is pop one card out and another in. No worrying what folders to back up and zero down time.

      Comment

      Working...
      X