Hi guys,
I need your help. I’m not much familiar with linux, but one year ago, I was able to setup my raspberry with openhab and create my smart home. I also set up backups in Amanda. Few days ago, my USB drive stop working and whole my settings are gone.
I still have Amanda backups on my external HDD drive. But sadly, I have no clue how to restore it.There are 15 slots from last days.
I made clean install into my raspberry on new usb drive. I went through Amanda documentation, but I’m completely lost
Difficult because we can’t teach you all the Linux basics on the go.
You need a Linux machine with a working Amanda install and your backup database to know what’s stored where… If you don’t have any, easiest is to install openHABian on another SD card.
If you have made dumps of one or more partitions, you can restore them as described here.
If your database was lost, see if there’s a copy on your backup HDD (openHABian creates those copies. Try recovering it from there, use tar to extract and cp to copy the files to your working system.
If you don’t manage to recover your database, you need to try this.
I know that you cannot learn me linux, and I’m really appreciate for your reply and help.
Now, I have new Raspberry with latest openhabian and also Amanda should be already instaled (not set up)
I also have mounted my external drive where is backup from Amanda.
But now, I’m not sure what I have to do, to restore that backup, or at least open it and copy my data.
What I have on external drive is:
Directory amanda-backup
Directory with slots
and data in slots
if A) does not work see last section of Amanda README and play along the example to extract your files from the data in your slots dirs. Note they’ll either be a dump format or tar, depending on what you backed up.
Good luck
Ok, Thanks.
Now, I know how to restore files. Issue is, that it cannot see my backup.
When I set date to backup date, it always show me “500 No dumps on or before date…”
So it looks like database wasn’t restored.
I moved it into amand-backups directory and run “tar xpzf /amanda-backups/amanda_data_20190211221504.tar.gz”
It went without any errors.
And option B doesn’t work wor me. All files except 00005.myhome._dev_mmcblk0.0 are basicaly empty. They have 32KB. Only this one have around 12GB. But I don’t know how to open it. I tried last page from tutorial, but without success. It’s not tar file.
Well then unfortunately there was nothing backed up on those dates (which also explains the “no dump” output). Use amoverview <config> to get a hint what’s there.
You could try setdisk /dev/mmcblk0 in amrecover for that only file to contain anything.
Glad I was able to help
Well you essentially did the right thing in installing Amanda. It’s just you didn’t validate your backups as recommended in the README. Start with checking /etc/cron.d/amanda, it should start them once a day and run amreport <config> daily to see what’s going on.
I had backups from each day. There are slots and modification dates fits. Weird is, that data in all slots are same. It’s few months old backup. It looks like same date as last manual backup of openhab. But anyway, it helped me a lot. I have to go again through readme and wind what I screwed.
If you still have your backups, could you please try if using this makes them accessible from Amanda again ?
[11:29:09] backup@openhabianpi:~$ amreindex
USAGE: amreindex [ --timestamp|-t timestamp ] [-o configoption]* <conf>
USAGE: amreindex [-o configoption]* [--exact-match] <conf> [hostname [diskname [datestamp [hostname [diskname [datestamp ... ]]]]]]
amreindex re-index Amanda dump images by reading them from storage volume(s)
Arguments:
config - The Amanda configuration name to use.
-t timestamp - The run of amdump or amflush to check. By default, check
the most recent dump; if this parameter is specified,
check the most recent dump matching the given
date or timestamp.
--exact_match - host, disk and datestamp must match exactly.
-o configoption - see the CONFIGURATION OVERRIDE section of amanda(8)
[11:29:47] backup@openhabianpi:~$