SMB windows directory as source data

I am using Duplicati as headless server under ubuntu linux. I need Windows shared folder from WIN10 PCs (SMB/CIFS) but I don’t know how to indicate de URI.

A coworker tested Duplicati under windows enviroment and this behaivor was possible. Know we want to use it under ubuntu linux.

Thank you so much,

Hi @matiaspecchia, welcome to the forum!

Are you wanting to use the Windows share as a Source or Destination?

1 Like

I need use the windows share as source


Duplicati works best if it is installed on the machine with the files. It is not optimized for reading files on a network share.

In any case, you need to use SAMBA to set up CIFS share mounts in Linux. There is no CIFS implementation in Duplicati, so you simply need to mount the folder with SAMBA and then point to it, e.g. /mnt/smbshare.

While the easiest way would be to permanently mount the share (such as by editing /etc/fstab) you COULD dynamically mount it as part of the Duplicati backup with a --run-script-before or --run-script-before-required call to a script that runs something like mount -t cifs // /mnt/smbshare -o username=myUser,password=myPassword.

Then have a --run-script-after that un-mounts it with something like umount /mnt/smbshare

Note that if the backup is interrupted before the --run-script-after can fire (such as a power outage) then the mount won’t get un-mounted. If that happens then when Duplicati runs the pre-script, it will report a “Device or resource busy” type error which MIGHT cause Duplicati to not run the backup (such as if --run-script-before-required is used.

To avoid that you would probably want to add a “mount only if the share isn’t already mounted” check to the pre-script.

In Intented this, but I shoud have a duple {before,after}-script for each backup since this option does not accept arguments for the called script, See Arguments when running a script (via run-script-before-required) Features int this forum