[SOLVED] Back up strategy with Amanda

Using the great readme on Amanda by @mstormi I managed to implement a full SD card backup on my QNAS. Now I’d like to verify this strategy here.

So what I have now:

  • I created and NFS share on my QNAP NAS
  • I mounted it to /storage/nas
  • I installed Amanda, selecting the Raw SD card option
  • I ran amdump, the report shows:
                                                          DUMPER STATS   TAPER STATS
HOSTNAME     DISK              L  ORIG-kB  OUT-kB  COMP%  MMM:SS   KB/s MMM:SS   KB/s
-------------------------------- ----------------------- -------------- -------------
openHABianPi /dev/mmcblk0      0 15612928 3004898   19.2   98:43  507.3  98:40  507.6
openHABianPi /etc/openhab2     0      270     270     --    0:02  153.4   0:00 2700.0
openHABianPi /var/lib/openhab2 0    87600   87600     --    0:45 1927.2   0:48 1825.0

So I gather all went well, and there is 3 GB of data on my NAS. WoopWoop
I’m still debating whether I’ll back these up to my google Drive from the NAS, but that would make sense.

Now I have to restore scenario’s I’m wondering about. In case of corruption, what scenario would be best?

I have a clean openhabian SD (nr.2) that I can boot from, install Amanda and restore the backup to another SD card (nr. 3) from the NAS. But there’s no Openhab-dir conf files anymore. Q: Is there an option of pushing these to the backup location un-tarred with Amanda as well? Or do I make a simple script that copies them every X days to the NAS?

  1. I regularly schedule Amanda (or do it manually after big changes) to restore the dump from the NAS to SD nr. 2. That way I am always good to go when things go bad. But this wears out the backup-SD as well…

Any ideas on above scenarios, or maybe even other ones? Love to hear it.

  • Platform information:
    • Hardware: Raspberry Pi Zero W | 512 MB RAM
    • OS: Raspbian GNU/Linux 9 (stretch)
    • Java Runtime Environment: openjdk version “1.8.0_152”
    • openHAB version: openHAB 2.4.0 Release Build
1 Like

A Newbie here.
Assuming it would work with an SSD source, a link to that README would be awesome!

Hi Bruce, it’s available from the openhabian-conf, the same place you’d install Amanda from. However, it’s more readable from Readme on github

If you’re a Windows user (as I am) be ready to read up on mounting and a bit on user rights/roles

Former Unix admin here running on a Pi 3B+ but very new to OH.
Last week a power glitch must have happened. Somehow my OS was the default config with no OH or data :frowning: Fortunately I had a data backup but a whole image would be good.

I messed with Amanda years ago to backup some servers to tape but much has changed since then.

Thanks again.

Restore your most recent backup of /dev/mmcblk0 to a fresh SD card. It’ll contain Amanda programs, config and index.
See also /etc/cron.d/amanda. It should already contain a daily cron job that tar-copies the Amanda data to your storage dir.

Just do that manually after really significant changes to your setup.
For the rest of the time use openhab-cli to backup (and eventually restore) the OH config to/from your NAS location.

Ah right, I was under the impression that I’d need an Amanda config to restore, but after thinking about it that sounds illogical. Thanks for the assistance!