Disaster recovery Amanda backup

Hi All,

I have latest version of OH2.5.1 running on openhabian.
The partion was transfered to USB-Hdd, with the onboard tools of openhabian.

Unfortunately the HDD stopped working after 1 months.

I created backup with Amanda all day before, but I have no clue, how I get back to my data.

If I read through https://github.com/openhab/openhabian/blob/master/docs/openhabian-amanda.md#restoring-a-partition I understood, that I need to login via the console - but impossible the system does not boot any longer (or at least I don’t get a ssh connection).

Any ideas or suggestions are welcome.

Really bad day today…

Connect the hard-drive to to computer (preferably linux).
Inspect the drive with given tools.
Try to mount the data partition, grab your backup and all the data you want.

On linux you could use dmesg -w to watch what’s happening if you plug in the HDD.
Normally it should display something like this.

[60505.681448] sd 3:0:0:0: Attached scsi generic sg2 type 0
[60505.682537] sd 3:0:0:0: [sdc] 62533295 512-byte logical blocks: (32.0 GB/29.8 GiB)
[60505.682878] sd 3:0:0:0: [sdc] Write Protect is off
[60505.682885] sd 3:0:0:0: [sdc] Mode Sense: 23 00 00 00
[60505.683296] sd 3:0:0:0: [sdc] No Caching mode page found
[60505.683301] sd 3:0:0:0: [sdc] Assuming drive cache: write through
[60505.689149]  sdc: sdc1 sdc2
[60505.691114] sd 3:0:0:0: [sdc] Attached SCSI disk

I can tell from this output that there is a sdc1 and sdc2 partition.

Furthermore I can check these partition with fdisk -l /dev/sdc

/dev/sdc1         8192    96663    88472 43,2M  c W95 FAT32 (LBA)
/dev/sdc2        98304 62529535 62431232 29,8G 83 Linux

Then I can mount /dev/sdc2

mount /dev/sdc2 /media/usb

Then I can access the data on /media/usb

I hope you made sure it’s one of both.
If there is only a problem with network you should check that first.

Harddrive is dead - is given the sound of dead (tick, tick, tick…).
There happens nothing when I entered dmesg -w

As said, I need to connect new hdd and then start from scratch.
How could I used amanda then? What are the steps?

I don’t use Amanda but where is the backup stored? If on the same hard drive then you may be out of luck or have to pay someone to retrieve the info.

Going forward you may want to clone your hard drive once a month or so to have a complete duplicate of your system. If you just need the OH configs backed up you can use sudo opanhab-cli backup --full* and move the zipped file to a USB or your PC.

Ok, got the hdd running somehow…

But anyway, I feel really uncomfortable to have a daily backup (on external storage) and have no clue how to do a disaster recovery with an external hdd.

Any advises are welcome!

Read the final paragraph of the Amanda README.