Amanda - NAS

Hello! Im trying to setup Amanda so i can do backups. I want to use my NAS as storage.
I have mounted a NAS folder and i can write files to it from openhab. So everything seems to work.

However, when i run the install of Amanda. i get the following errors:
ln: failed to create symbolic link ‘/mnt/raspberry_pi_backup/slots/drive0’: Permission denied
ln: failed to create symbolic link ‘/mnt/raspberry_pi_backup/slots/drive1’: Permission denied

On my NAS i can see the folowing folders created by Amanda
slots -> slot1

This is how i mounted my NAS folder in /etc/fstab
//NAS/raspberry_pi_backup /mnt/raspberry_pi_backup cifs credentials=/home/openhabian/.smbcredentials,iocharset=utf8,sec=ntlm 0 0

I dont understand why i get permission denied. If i can write to the NAS folder. Anyone have experienced this before and can help?

Thank you!

Now first, that’s something completely beyond Amanda’s scope.
Second, there’s issues related to CIFS such as those raised here.

I’m just guessing since you didn’t explain - it looks like you have a REALLY weird setup:
Server (your NAS) is a UNIX box, client (openhabian) is UNIX, but you’re using CIFS (Windoze !!) to share the disk ? What a nonsense. Move over to use NFS and you should be fine.

Ah ok!. I have now created a NFS share on my NAS. and mounted that. however i now get this problem:
ln: failed to create symbolic link ‘/mnt/raspberrybackup/slots/drive0’: No such file or directory
ln: failed to create symbolic link ‘/mnt/raspberrybackup/slots/drive1’: No such file or directory

If i create the directories drive0 and drive0 manualy. and run the openhabian-config again, Amanda finishes.

2017-09-28_16:34:43_CEST [openHABian] Checking for default openHABian username:password combination… OK
2017-09-28_16:34:43_CEST [openHABian] We hope you got what you came for! See you again soon :wink:

so i gues its working. :slight_smile: just need to manualy start amdump

I was also getting “Permission denied” when trying to use Amanda to keep backup data into a preexisting NTFS disk that is mounted to the Pi.

After searching around, I figured out that NTFS does not support UNIX-type permissions, so ACLs for NTFS mounts are defined at mount time (on fstab) rather than on a per-file basis. I changed the mount on fstab to have uid=backup and gid=backup and now Amanda is able to do its magic!

Anyway, I will probably partition this disk to keep the files coming from Windows on NTFS and have openHAB backups on a separate ext4 partition.