How to Backup OpenHab 4 to a Fritz!NAS Using Amanda via CIFS

Hey everyone, I wanted to share my successful setup for backing up OpenHab 4 to a Fritz!NAS using Amanda via CIFS. I hope this helps someone else who might be struggling with similar issues!

First, I struggled for a few months trying to get Amanda backups working correctly on my Fritz!Box 7490. The Fritz!Box didn’t support NFS, so CIFS was my only option. I didn’t want to modify the Fritz!Box firmware, so I had to find a workaround.

Here’s what worked for me:

  1. Fritz!Box Setup: I created a new user called ‘RPIBackup’ with access to the NAS contents. I plugged in a USB drive formatted with NTFS and enabled SMBv1 support under the USB storage settings.

  2. Raspberry Pi Configuration: On my Raspberry Pi 4 Model B, I added credentials for the ‘RPIBackup’ user in the .smbcredentials file. I then updated the fstab file to mount the Fritz!NAS drive to /backup using CIFS.

  3. Testing the Setup: After rebooting the Raspberry Pi, I verified that the NAS drive was mounted correctly and that I could create and delete files as the ‘backup’ user. Everything worked smoothly!

  4. Amanda Backup Installation: Once the mounting was confirmed, I installed Amanda backup through sudo openhabian-config. The backups have been running without issues ever since.

This setup has been a lifesaver for me, especially since my Raspberry Pi is in an inaccessible location. I no longer need to worry about connecting additional USB devices for backups.

I hope this guide helps someone else avoid the frustration I felt during the setup process. If you have any questions or need further clarification, feel free to ask!

Cheers,
Will