Ability to Set Backup Subdirectories in SMB Shares

The addition of mounted network-attached storage in Home Assistant was a very welcome one. I already used @frenck 's addon to automatically back up my server to a SMB share on my network. Since the additon of the built-in feature, I have switched over.

My only issue with the feature is the lack of ability to set the sub-directory. Since the SMB share I use for server backups on HASS is shared with other servers on my network, It’s important for me to be able to organize the share. Home Assistant puts it’s compressed backups directly on the root of the share, while I have directories for all the other machines. Not having to manually copy over the tarballs would be quite the time saver.

Even something as simple as the ability to parse out a path instead of a share name by itself would be very beneficial. Something like this:
image

This is required to make the CIFS feature at all usable for me, so +1.

Thanks for the writeup @djripcord :slight_smile:

By accident (because back to SMB/CIFS didn’t work for me at all initially), I learned that it is indeed possible to specify subdirectories directly in the “Remote share” field with a forward slash

In @djripcord’s example, I am pretty sure
Server_Backups/Sub-dir1/Home_Assistant_Backups
should work.

In this case Server_Backups is the name of the actual SMB share, and Sub-dir1/Home_Assistant_Backups would be the directory tree.

It worked for me (see Backup to network location (SMB/CIFS share) now working - #3 by Palmin)

I think the documentation and the wording in the dialog could be improved, other SMB client implementations have separate fields for Share and Subdirectory, which gets rid of this confusion.