Take Files from an SMB-Folder

Hi guys,
i´m new with Duplicati and can someone tell me how can i take files from an Raspberry Pi SMB-Folder.

I have an PC with Duplicati. Here is no Problem, i set up my backup plan from the local machine to an online account. In my network is an Raspi with 3 Share Folders.

I tested it with the following settings:

run script before:

mount -t cifs //192.168.10.1/Daten /mnt/Daten -o username=User,password=Password

Error log:

  • 2023-02-10 14:15:46 +01 - [Warning-Duplicati.Library.Modules.Builtin.RunScript-ScriptExecuteError]: Fehler beim Ausführen des Skripts “mount -t cifs //192.168.10.1/Daten/ /mnt/Daten/ -o username=User,password=Password”: ApplicationName=‘mount -t cifs //192.168.10.1/Daten/ /mnt/Daten/ -o username=User,password=Password’, CommandLine=‘’, CurrentDirectory=‘’, Native error= Cannot find the specified file

Can someone tell me what i make wrong or is there no way to backup these files?

The script must be an actual shell script. Putting commands with command-line params are not supported.

You are my hero. when i put these commands into a sh, i only become an exit-code 255

i check the script:

#!/bin/bash
mount -t cifs //192.168.10.1/Daten /mnt/Daten -o username=User,password=Password
exit 0

When i type this mount command in the console, then i became the error:
mount: /mnt/Daten: cannot mount //192.168.10.1/Daten read-only

Do you know whats wrong?

If the script returns an error when you run it manually, then it makes sense that Duplicati would also experience the error.

I am not sure why your smb mount is failing. Could be many causes. First make sure you can actually ping the destination:

ping 192.168.10.1

Then I’d probably see if I can view the list of shares:

smbclient -L 192.168.10.1

(Of course these commands should be run from the machine with Duplicati - the machine that will try to run your mount shell script.)

Hey, my Duplicati runs in Docker and ping and smbclient “command not found”

Oh ok, that’s an important detail. Are you pretty new to docker? Docker containers are isolated from the host machine. In general you cannot run scripts that exist on the host machine, or use its binaries and libraries. You can’t even see the host filesystem if you don’t set up bind mounts.

The Duplicati docker image contains almost no utilities (not even ping!) and none of the smb/cifs mounting capabilities.

One option is to do the smb mount on the host machine itself, and ensure that your docker container can see it by setting up the appropriate bind mount. The downside is you cannot trigger this from within Duplicati (remember, docker container cannot typically do anything on the host machine directly). So maybe you just leave it as a permanent mount?

Alternatively, you MIGHT be able to install the necessary smb/cifs mounting stuff inside the docker container. But this is generally not recommended. If you upgrade or reset your container, you’ll have to redo those customizations. The general philosophy of docker containers is to leave them unmodified so the upgrade procedure is seamless.