Backup to network location (SMB/CIFS share) now working

Hi there,

I tried to set up a backup to my FritzBox FritzNAS through SMB/CIFS.

I have entered the connection information in Settings->System->Storage, and I don’t get an error, so I have to assume that the connection is working.

This is the Supervisor log, which also seems to be OK:

23-10-12 19:46:52 INFO (MainThread) [supervisor.mounts.manager] Creating or updating mount: fritznas
23-10-12 19:46:52 INFO (MainThread) [supervisor.mounts.mount] Mount fritznas still activating, waiting up to 30 seconds to complete
23-10-12 19:47:02 INFO (MainThread) [supervisor.backups.manager] Found 28 backup files

When I trigger a backup to the network location, I get an error:

23-10-12 19:25:49 INFO (MainThread) [supervisor.backups.manager] Creating new full backup with slug ff8f5637
23-10-12 19:25:49 ERROR (MainThread) [supervisor.backups.manager] Backup ff8f5637 error
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/backups/manager.py", line 239, in _do_backup
    async with backup:
  File "/usr/src/supervisor/supervisor/backups/backup.py", line 300, in __aenter__
    self._tmp = TemporaryDirectory(dir=str(self.tarfile.parent))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/tempfile.py", line 854, in __init__
    self.name = mkdtemp(suffix, prefix, dir)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/tempfile.py", line 368, in mkdtemp
    _os.mkdir(file, 0o700)
PermissionError: [Errno 13] Permission denied: '/data/mounts/fritznas/tmpf6uaxjsj'

I am not really sure if HA has mounted the correct directory, because of the log Found 28 backup files when connecting. I don’t see any directory with 28 files in my network share, but my local HA backup directory contains 28 backups. So I guess at least the logging when creating a network storage location seems a bit misleading.

Does anyone have any hints what I can do to debug the network storage connection?

This is on a Home Assistant 2023.10.2
Supervisor 2023.10.0
Operating System 10.5

Thanks a lot in advance,
Bernd

OK, so at least I understand that the message Found 28 backup files is unrelated to the SMB mount, because it also appears after deleting the network storage.

Got it to work now:
The issue was that I only entered the name of my share “fritzbox” under “Remote share”, but I needed to add the subdirectory, e.g. “fritzbox/FritzNAS”.
In other SMB client implementations, these are often defined separately, so I guess I was confused.

Hi @Palmin ,

may I ask what parameters are you putting in the various fields when you set up the remote drive in HA to make it work?

I have a Fritzbox too with Fritz Nas enabled on a USB connected external drive, and struggling to get it to work, I think I am writing the wrong parameters as I always get errors:

CIFS: VFS: Error connecting to socket. Aborting operation.
CIFS: VFS: cifs_mount failed w/return code = -111

What I am putting:

  • Usage: share
  • Server: fritz.box (and tried also the internal IP too)
  • Protocol: samba
  • Samba version: 2.1+ (altough I tried all of them)
  • Remote share: tried many combinations with the directory I am sharing and “fritz.nas”
  • username and password of a fritzbox user with nas access.

I didn’t enable the samba share in the fritzbox settings :man_facepalming: you need to scroll down to see that option, and I never scrolled down. Now everything works fine.

1 Like

Short question. I also missed the SMB option once. But then it was working. But when I checked the backups this morning, nothing showed.

I do use Google Drive HACS integration to also save the backup in the cloud (better save then sorry). Anyone might experience the same? Could it be possible that the energy save option needs to be set to “never” ?

Hi,
I accidentally deleted my settings for network share.
Can you share your settings? Maybe a screeshot of your configuration?

Thanks.

This is how the settings look like in my case:

1 Like

above are like mine.