Amanda howto for openhabian and NAS

Thanks to @mstormi I found Amanda on my openhabian-Pi3 after updating.
Sounds great - but I’m not able to understand the config-dialogues - so I don’t know how to start.

I would like to backup to my Synology NAS - but there’s no connection/mount between Pi and Synology at the moment.

I don’t know how to mount a NAS-Folder to my Pi3 - I even don’t know, if this is necessary?!?
Where should I start?

1 Like

Amanda needs storage, it does not matter whether it’s mounted from NAS or locally USB-attached. There is no openhabian dialogue to mount a share, so if you want to use that space on your NAS, get into the shell and edit fstab.
If you run a NAS and a Pi, you should know how to mount a drive or share there, shouldn’t you ?
If you don’t, Google knows. openhabian isn’t meant to be a compendium with tutorials for each and every Linux task.

1 Like

Thank you, that helps to start.
In Windows-Backup-Solutions I don’t have to mount - instead I point to the target path (on my nas).
So I’m not familiar with the concept of mounting - but I’ll google that…

Amanda creates versioned backups that can be restored?
That means to restore a backup I have to install a fresh openhabian, install amanda again connected to the nas and then I can restore the old version?

Windows is the same, they call it different and use a different protocol, but essentially, it’s to mount, too.

You can create copies of your running openHABian at any time by restoring Amanda-made backups to a fresh SD card. But you need a more-or-less up to date Amanda (meta)database for that, so you need to prepare a SD clone card to include such backup metadata and refresh the card every now and then else when the system crashes, you have a chicken-egg-problem.
You could also move the Amanda database directories to the NAS so they’re still up to date when your openhabian/Amanda server crashes.

I tried amanda but stuck here:

tpchanger “chg-disk:/mnt/NAS/slots” # The tape-changer glue script


INFO taper taper pid 26518
ERROR taper no-tape error [directory ‘/mnt/NAS/slots’ does not exist]

I have successfully mounted my NAS, and directory is r/w by the backup user.

Any Ideas?

Just tried local dirs, and same thing happens…
I am stuck.

The line should read tpchanger chg-disk:/mnt/NAS/slots (note the missing s at the end)
Is there a directory /mnt/NAS/slots on your openhabian box, and does it have subdirectories slot1 .... slotXX ? These are created when you select to install Amanda. Of course you need to have your NAS storage mounted as /mnt/NAS before you run the Amanda setup, else this cannot work.

Hi Markus,

Yes naming is correct (slots) and I have the subdirs (slot1, 2 & drive0, etc )

I guess, the problem is with the directory permissions. I appears that cifs mount point needs something different in fstab.

// /mnt/NAS cifs uid=34,gid=34,rw,credentials=/etc/cifspasswd 0 0

uid/gid 34 is backup:backup

In your post, naming was wrong.

Unlikely if the error message still says ‘directory does not exist’.
There’s Amanda logfiles under /var/log/amanda. See if they provide more hints.

Btw, most NAS are UNIX, as is your client, so it doesn’t make sense to use CIFS. Use NFS instead.

I’m trying to set up a temporary backup solution using a shared folder on my windows pc, but can’t mount in on my Rpi 3 (with openhabian) when i try to run

sudo mount -t cifs -o user=ander // /home/openhabian/openhab-backup/

i get this error message:

mount error: cifs filesystem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

when googling i have seen other people solve it by doing a kernel upgrade using

sudo rpi-update

but my Pi doesn’t recognize that command. Is this utility (I guess it is: not included in openhabian? Can I install it anyway and run or could it screw up my system, as it is not standard raspbian?

Anything else i could try?

Fwiw, my kernel version is:

$ uname -rv
4.9.28-v7+ #998 SMP Mon May 15 16:55:39 BST 2017

Why don’t you just plug in a USB stick to your Pi ? Way simpler than to start messing with kernel packages.

Sometimes the obvious solutions get hidden outside of your tunnel-vision when you’re determined to solve a problem. :wink:

Would still like to know why I can’t mount a cifs-share though…

Yeah, and very common in home automation :slightly_smiling_face:
I actually wanted to propose to do the export in Windows using NFS, but googling for how to enable NFS in Win 10 revealed that’s cumbersome, too (well I finally found it, but such a proposal will probably place you into the next tunnel … )

Try apt-cache update; apt-get dist-upgrade, that should bring openHABian/Raspian/RPi kernel to its latest version (I’ve got 4.9.35 running but don’t use CIFS).

I realized i hadn’t rebooted my Pi in a while, and apparently i had updated the kernel some time ago, because when it started up i had 4.9.35 running, and mountlig worked without problem.

I think I’ll make a “Have you tried turning it off and on again?”-sticker to put on it :wink:


who can help me?
Unfortunately I find no “how to” guide, where it is explained, how to create a Rasi3 to NAS (Synology) backup and restore.
It would be nice to have a tutorial “how to backup and restore” for this combination.
Who can help or have a working solution?

What’s wrong with using Amanda ? See README which is also included in the openHABian docs directory.

nothing is wrong with using Amanda, but what would be nice is a “step by step” tutorial.

You don’t feel the README is a tutorial ? Did you really read it ?
Please bear in mind that a user has to contribute at least some knowledge such as how to use a UNIX shell and to mount a disk. For those that don’t, we can’t explain all the basics to everybody (there’s WAY too many), and there’s still Google.

Yes I really read the README tutorial.
I have already read a lot of very good “step by step” tutorials, but especially to such an important topic I have found none.

Well, jump in, then - this is a community contribution effort. Write down the steps it took you to get your backup working and that you feel to be missing in the Amanda README, post it here or send it to me, and I’ll include it in the existing docs.

Well, perhaps I do this, but for that I need then a few hours of leisure.
I will keep you up to date

But maybe someone really has experience and can share it with us?
I have to get involved here!