OSMC Backup to SMB NAS

Personally, I don’t use any OS-level network mounts, and just use passwords.xml in Kodi to translate the fake path in Kodi to the real path of the NAS, which includes the username/password. Not secure as the username/password is stored in plain text, but the account I use is very locked down on the NAS and could really only delete OSMC backup files (but my NAS protects them internally). It’s got read-only access to my media files, so a hacker could look at those if they really wanted to :man_shrugging:

So my passwords.xml file is along the lines of this:

<passwords>
    <path>
        <from pathversion="1">smb://[Name_For_NAS_In_Kodi]</from>
        <to pathversion="1">smb://[NAS_username]:[NAS_password]@[NAS_IP_Address]</to>
    </path>
</passwords>

Example:

<passwords>
    <path>
        <from pathversion="1">smb://MyNAS</from>
        <to pathversion="1">smb://osmcuser:osmcPassword1@192.168.1.2</to>
    </path>
</passwords>

Then I can just use

smb://[Name_For_NAS_In_Kodi]

From above Example:

smb://MyNAS

for the start of any source in Kodi, backup location in OSMC, etc. and it all works.
I use the Emby plugin with direct paths, and that all works fine too (with a small bit of configuration).
This is translatable to any Kodi platform, so not just for OSMC.
I use IP address in the translation to remove any requirement for name resolution (DNS, etc.), but then my NAS needs (and has) a static IP address.

Make sure you update to OSMC August 2024 Update (with Kodi 21.1) to make sure backups in OSMC work correctly to a NAS: otherwise you may well get this error message when backing up to a NAS location.

1 Like