I have 2.0.7.1_beta_2023-05-25 running on a MacOS. I’m trying to configure the backup to use a CIFS share on a NAS. I go through the setup process and opt to manually configure the local file path. I setup the info as
\\nas2.mylocaldomain.com\GorfsRealName\Backups
and then enter my username and password. When I test the connection I immediately get back
The folder \\nas2.mylocaldomain.com does not exist. Create it now?
If I say “yes” it just gives me an error that says
Failed to connect: Read-only file system
I’m struggling to understand why. I did try reversing the backslashes thinking maybe there was something going on there, but no change. I don’t get any access logs on the NAS side. Im also really struggling to create any debug logs. Can anyone offer any thoughts?
Edit:
I am now generating some error logs:
System.IO.IOException: Read-only file system
at System.IO.FileSystem.CreateDirectory (System.String fullPath) [0x00191] in <baaab171478d4061bd9316f48a642f06>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x0002c] in <baaab171478d4061bd9316f48a642f06>:0
at Duplicati.Library.Common.IO.SystemIOLinux.DirectoryCreate (System.String path) [0x00006] in <18a31807bb9d49ff8938883d8e8a36b7>:0
at Duplicati.Library.Backend.File.CreateFolder () [0x00018] in <a11c194a0ed94b3ea73efea18edcd2ee>:0
at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.CreateFolder (System.String uri, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x0000c] in <30a34d71126b48248d040dda634ddad9>:0
at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.POST (System.String key, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x0007f] in <30a34d71126b48248d040dda634ddad9>:0
at Duplicati.Server.WebServer.RESTHandler.DoProcess (Duplicati.Server.WebServer.RESTMethods.RequestInfo info, System.String method, System.String module, System.String key) [0x00289] in <30a34d71126b48248d040dda634ddad9>:0
If I’m wrong, maybe an expert will say, otherwise SMB mount is probably on you.
If you want it only while Duplicati backs up, you can use scripting options for that.
Yeah I mean I’m kinda just working out of the documentation. My assumption was that the code itself interpreted it. I have tried using forward slashes, but with the exact same results. I also tried escaping them in both directions. And, of course, swearing at it. haha
I also made the assumption that the username and password would be used via some underlying SMB/CIFS library to negotiate the authentication. Maybe Duplicati isn’t that sophisticated in this regard. I’m used to services running as a daemon in their own context regardless of what I am doing.
Mapping drives is a little too 90’s for my taste. I guess I could just pull together an object store interface backed by the NAS storage. That seems so clunky. And no NFS right?
Looking at the error message, it seems you are attempting to use the WebDAV backend, but the path is Windows-style UNC? And you are on MacOS?
On MacOS you can mount the remote folder and then it will work like a normal filesystem path. You can also mount it with NFS on MacOS I think, but the process is the same.
If the remote machine has some kind of non-SMB support, you can use WebDAV, SFTP, FTP, etc.
No, not Webdav. I’m using the Local folder or drive option. I’m following the documentation:
In order to specify network filesystem that is not mounted into your local filesystem click on Manually type path option which allows you to specify the Folder path directly in the following format:
Since my original post, I did setup a capture port on my switch and there is not a connection being made at all. Not even an opening SYN. So this now appears to be an error in Duplicati itself. I’m going to give up on it on this machine for now. It seems to work great on Linux and Windows, but Mac’s seem to be a little sketchy still.
I call it an error in documentation (including help text) and UI to not say it’s only Windows:
C:\Duplicati\duplicati-2.0.8.1_beta_2024-05-07>Duplicati.CommandLine.exe help file
Duplicati can use the local file system to store backups. The following target
URL formats can be used:
file://hostname/folder%20for%20backup
file://\\server\folder%20for%20backup (UNC path)
"C:\folder for backup"
file://c:\folder%20for%20backup (Windows)
file:///usr/pub/folder%20for%20backup (Linux)
Options:
--auth-password
The password used to connect to the server. This may also be supplied as
the environment variable "AUTH_PASSWORD".
--auth-username
The username used to connect to the server. This may also be supplied as
the environment variable "AUTH_USERNAME".
--alternate-destination-marker
This option only works when the --alternate-target-paths option is also
specified. If there are alternate paths specified, this option indicates
the name of a marker file that must be present in the folder. This can be
used to handle situations where an external drive changes drive letter or
mount point. By ensuring that a certain file exists, it is possible to
prevent writing data to an unwanted external drive. The contents of the
file are never examined, only file existence.
--alternate-target-paths
This option allows multiple targets to be specified. The primary target
path is placed before the list of paths supplied with this option. Before
starting the backup, each folder in the list is checked for existence and
optionally the presence of the marker file supplied by
--alternate-destination-marker. The first existing path that optionally
contains the marker file is then used as the destination. Multiple
destinations are separated with a ";". On Windows, the path may be a UNC
path, and the drive letter may be substituted with an asterisk (*), e.g:
"*:\backup", which will examine all drive letters. If a username and
password is supplied, the same credentials are used for all destinations.
--use-move-for-put
When storing the file, the standard operation is to copy the file and
delete the original. This sequence ensures that the operation can be
retried if something goes wrong. Activating this option may cause the
retry operation to fail. This option has no effect unless the
--disable-streaming-transfers option is activated.
--force-smb-authentication
If this option is set, any existing authentication against the remote
share is dropped before attempting to authenticate
--disable-length-verification
Disable length verification
C:\Duplicati\duplicati-2.0.8.1_beta_2024-05-07>
I already pointed to the Windows OS code that runs. That code’s not going to be on macOS.
EDIT 1:
and if Linux automatically mounts, then that surprises me. As noted, Duplicati uses OS SMB.
EDIT 2:
OS SMB can sometimes do the auto-mount (but probably not with the Duplicati credentials):
That documentation should mention it is only for Windows. Linux and MacOS does not support Windows-style UNC paths, as they require everything to be mounted into the filesystem.
You can see the official Apple documentation for how to mount an SMB/CIFS share:
After it has connected, it will be somewhere under /Volumes/<share-name>.