Duplicacy CLI cannot send login credentials properly

I want to try/use Duplicacy CLI for cloud storage backup via FTP.
According to the Duplicacy quick tutorial, the proper login command formatting should look like this: ftp://user@

But this causes a problem for me, because the login name to my cloud storage account is the e-mail address I used when I registered the account long ago. This login name is the same regardless of what protocol I use, SFTP, Webdav etc. There is no way to change this circumstance.

This means that my login command ends up looking like this, with two ‘@’ in the parameters:

Needless to say, this doesn’t work.

I’m looking for suggestions to alternatives to this login method, workarounds or … perhaps I’m missing something that doesn’t appear to me at this time.

Thx in advance for any input

Welcome to the forum Franz!

It is strange that the provider use this, because this username format does not match the RFC1738 standard:

<user> : <password> @ <host> : <port> / <url-path>

Try with the @ character in your username encoded (%40):


Hi, Towerbr. Thank you for the welcome.

Yes, I must agree. I haven’t seen many login names like this - other than through web forms. But the cloudstorage provider is a big and wellknown one, so this is not because I’m using some small obscure and strangely set service.

I will try your suggestion once I get home, and report back.

Duplicacy doesn’t supports FTP. For SFTP I think you can have 2 @'s in the storage url. Anything before the second @ will be taken as the user name.

Good point… SFTP… I didn’t notice this “detail”… :roll_eyes:

You’re right!. Me writing FTP is wrong. I should’ve written Webdav, that’s what I used.
I use the same client for both FTP, SFTP and Webdav so it seems I caught on to the wrong word there. Sorry 'bout that.

Ok, this was interesting. I tried using %40 instead of @, like this:

duplicacy init mytest1 webdav://user.name%40mailserver.com@dav.fileserver.com/dav/backuptest

… and in return I got “runtime error: slice bounds out of range”. Followed by the these descriptions in the prompt:

goroutine 1 [running]:
runtime/debug.Stack(0x29, 0x0, 0x0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0xae
        /usr/local/go/src/runtime/debug/stack.go:16 +0x29
        /Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/src/duplicacy_log.go:183 +0x190
panic(0xc72560, 0x12d0970)
        /usr/local/go/src/runtime/panic.go:502 +0x237
github.com/gilbertchen/duplicacy/src.CreateStorage(0xd8d091, 0x7, 0xc04208a080, 0x6, 0x0, 0x0, 0xc0420b0080, 0x35, 0x0, 0x0, ...)
        /Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/src/duplicacy_storage.go:630 +0x47ae
main.configRepository(0xc0421c6ea0, 0xc0421c6e01)
        /Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/duplicacy/duplicacy_main.go:317 +0x5e6
        /Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/duplicacy/duplicacy_main.go:212 +0x37
github.com/gilbertchen/duplicacy/vendor/github.com/gilbertchen/cli.Command.Run(0xd8a583, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0xdbee5b, 0x4f, 0x0, ...)
        /Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/vendor/github.com/gilbertchen/cli/command.go:160 +0x7f1
github.com/gilbertchen/duplicacy/vendor/github.com/gilbertchen/cli.(*App).Run(0xc0421c6c60, 0xc042086080, 0x4, 0x4, 0x0, 0x0)
        /Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/vendor/github.com/gilbertchen/cli/app.go:179 +0x86b
        /Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/duplicacy/duplicacy_main.go:1996 +0x5853

… not sure what to make of this. Seems like the program wasn’t expecting the %40 and don’t know what to do with it?

The webdav backend will gladly take a username with a @. No need to replace it with %40. But of course %40 should not cause it to crash. I’ll fix this bug.

1 Like

Oh, seems I contributed to something annoyingly healthy (?) :slight_smile:

Right, Webdav seems to work anyway, as long as one includes the password after a colon between username and password.

I’ll take the opportunity to continue asking one thing about the coding. I know things about scripting, batches and simple programming, but the help of starting with Duplicacy CLI still feels like going over the deep end to me.

Since it’s an EXE for Windows, I’m assuming I should interact with this program via the common Win10 command prompt, yet most youtube videos about it demonstrates using telnet (?).

The first help about Duplicacy that I read, says “Once you have duplicacy in your path” … I don’t know what this means (?). Using the command prompt, how do I ‘get duplicacy in my path’? It doesn’t feel like it means moving into the directory where the executable is located, because the example code in the help is: $ cd path/to/your/repository, and the next line of code utilizes the duplicacy.exe in the current folder: $ duplicacy init mywork sftp://user@

First, the $ doesn’t work with the code in the command prompt, and this code seems to suggest I should relocate to the disk which I wish to backup? But that is not where the duplicacy.exe is located. Or, does it imply that duplicacy.exe ‘should’ be located there? If I want to backup 4 different disks, then perhaps duplicacy.exe needs to be found in the root dir of each partition? Oh, I just remembered, this refers to SFTP/SSH via Telnet, not the command prompt? Oh, well …

Well, what if I first try and interpret the code example as literary as I can. Initially I am positioned in the folder c:\duplicacy, so what if I use the DOS command “CD path/to/your/repository”, in my case “CD d:” … Well, then I’m still in the same folder. I need to manually go over to the D disc, to be in that directory. And once I am, I need to use a rework to access the duplicacy.exe.

So the first initial commands, like “duplicacy init d: mytest1” gives me this return:
“Failed to create the directory c:\duplicacy/ .duplicacy: mkdir c:\duplicacy.duplicacy: The system cannot find the file specified”

This is confusing to me. I guess I’m asking for a more accessible introduction on how to implement the commands and principles of the CLI version, because I have big problems figuring out how to do what. Once I’m off and running on the right software client, I can probably manage pretty quickly.

Since you want to use :d: cli, why not add duplicacy to any folder you like (eg. C:/all/PortableApplications/duplicacy.exe), and just run all commands with that path:

cd c:/the/path/to/the/repository

"C:/all/PortableApplications/duplicacy.exe" init
"C:/all/PortableApplications/duplicacy.exe" -d backup
"C:/all/PortableApplications/duplicacy.exe" -log -d list

Also, if you have very few repositories, you could just copy the exe file directly into the repo, and use it like duplicacy.exe backup etc.

Also, for scripting i like better powershell, as the commands make more sense and you also have autocomplete and global history.

Lastly, if you want to have a no headache cli usage, you could try my own scripts: Scripts and utilities index (open this link in a new tab)

Ooh, it turns out the storage service I’m using, and trying to get to work with Duplicacy, only offers Webdav as secure connection (https type). There was no ‘S’ in the adress (only in the https), so I didn’t catch it at first. I suspect Duplicacy CLI isn’t prepared for secure protocol handshakes - yet(?)

That must be why my Webdav attempts keeps failing. Have to see what other protocols I can use then …