Target URL gets truncated and causes backup failure

Environment info

  • Duplicati version :
  • Operating system : Windows 10
  • Backend : external USB drive.


I’ve had a problem where I cannot edit my backup task in the web gui without it getting corrupted. Today I exported the json before editing and then after editing to see if I could spot the corruption. It turned out to be very obvious.

This is before editing:

“TargetURL”: “file://z:\DUPLICATI\STEVEW10HP360?alternate-destination-marker=STEVEW10HP360.BKP&alternate-target-paths=*%3A%5CDUPLICATI%5CSTEVEW10HP360”,

This is after editing:
“TargetURL”: “file://z:\DUPLICATI\STEVEW10HP360?altern”,

As you can see, it has been heavily truncated. I could not see any other differences in the file except my edit (I enabled a filter on hidden files for this test, but the result is the same regardless of what change you make).

Are we able to fix this truncation of the targeturl so that it is possible to edit backup task with long targeturl strings in the gui? Currently the only way I can edit it is to export it as json, edit the json, and reimport it (which I’m doing with @Pectojin’s great duplicati_client/duc tool).

If there is any additional information you require please let me know.

Are you able to post your backup job exported “As Commandline” and post it here?

That would let us test editing a similar job.

Thanks @JonMikelV.

Here is my commandline, with the encryption passphrase replaced with a fake one of the same length.

“C:\Program Files\duplicati 2\Duplicati.CommandLine.exe” backup “file://z:\DUPLICATI\STEVEW10HP360?alternate-destination-marker=STEVEW10HP360.BKP&alternate-target-paths=*%3A%5CDUPLICATI%5CSTEVEW10HP360” “C:\Users\smw.STEVEW10HP360\Documents” “C:\Users\smw.STEVEW10HP360\Music” “C:\Users\smw.STEVEW10HP360\Pictures” “C:\Users\smw.STEVEW10HP360\Videos” “C:\Users\smw.STEVEW10HP360\Desktop” “C:\Users\smw.STEVEW10HP360\AppData\Roaming” “C:\Users\smw.STEVEW10HP360” --backup-name=“USB data backup” --dbpath=“C:\Users\smw.STEVEW10HP360\AppData\Local\Duplicati\USJKYVPTKB.sqlite” --encryption-module=aes --compression-module=zip --dblock-size=50mb --keep-time=3M --passphrase=666666666666666 --exclude-files-attributes=“system,hidden” --disable-module=console-password-input --exclude="%HOME%\AppData\"

When I get back on a Windows box I’ll try it out, but at first glance I’m wondering why alternate-destination-marker and alternate-target-paths are part of the destination parameter and not their own “–” parameters.

Thanks @JonMikelV. I also think that is strange. Something related that I found quite strange - I was trying to find out how to see how many files were backed up in the most recent version of the backup, and I found the compare command in the forum. I naturally thought that the path to my backup would be file://z:\DUPLICATI\STEVEW10HP360 and that I should stop before the ? because the ? would be the start of parameters in a URL. However, that whole ugly path is needed: “file://z:\DUPLICATI\STEVEW10HP360?alternate-destination-marker=STEVEW10HP360.BKP&alternate-target-paths=*%3A%5CDUPLICATI%5CSTEVEW10HP360” Leaving me with a complete command that looks like this:

duplicati.commandline compare “file://z:\DUPLICATI\STEVEW10HP360?alternate-destination-marker=STEVEW10HP360.BKP&alternate-target-paths=*%3A%5CDUPLICATI%5CSTEVEW10HP360” 33 34 --verbose --encryption-module=aes --passphrase=6666666666666666
(passphrase has been replaced with a fake)

But the other thing that surprised me was that for a compare between versions, it needed my backup drive to be present. I thought that duplicati was storing an index in sqlite on the computer, so I was very surprised that to do this compare it needed me to provide it with the actual backup. Is this an error or is it to be expected?

Anyway, thanks again.

That’s to be expected, though to be honest I’m not really sure why.