400 - bad_request: File names must not contain '\'

Just installed duplicati and connected it to Backblaze B2, but immediately get this error. I presume it’s from Backblaze:

"Operation Put with file duplicati-20180511T110002Z.dlist.zip.aes attempt 2 of 5 failed with message: 400 - bad_request: File names must not contain '\'
System.Exception: 400 - bad_request: File names must not contain '\'
   at Duplicati.Library.Backend.Backblaze.B2AuthHelper.AttemptParseAndThrowException(Exception ex)
   at Duplicati.Library.JSONWebHelper.GetResponse(AsyncHttpRequest req, Object requestdata)
   at Duplicati.Library.JSONWebHelper.ReadJSONResponse[T](AsyncHttpRequest req, Object requestdata)
   at Duplicati.Library.Backend.Backblaze.B2.Put(String remotename, Stream stream)
   at Duplicati.Library.Main.BackendManager.DoPut(FileEntryItem item)
   at Duplicati.Library.Main.BackendManager.ThreadRun()"

Should I just go hunting for a file with \ in the name or is this something more complicated?

Hi @Beatwolf, welcome to the forum!

Duplicati doesn’t create any file names using a slash (forward or backward) though I suppose it MIGHT be possible to “force” it to by using the --prefix=xxxxxx parameter with a “\” somewhere in xxxxxx. (Note that using --prefix is not recommended as it can cause unnecessary confusion later on.)

--prefix
A string used to prefix the filenames of the remote volumes, can be used to store multiple backups in the same remote folder. The prefix cannot contain a hyphen (-), but can contain all other characters allowed by the remote storage.
Default value: “duplicati”

I see it’s on attempt 2 of 5, did the backup job quit there or continue on? If it continued, then most likely the next attempt succeeded and there was just something odd about attempt 2.

(By the way, I edited your post by adding “~~~” before and after the error message to make it more readable.)

I have the same issue here. I am using Backblaze B2

System.Exception: 400 - bad_request: File names must not contain '\'

   at Duplicati.Library.Main.Operation.BackupHandler.HandleFilesystemEntry(ISnapshotService snapshot, BackendManager backend, String path, FileAttributes attributes)

   at Duplicati.Library.Main.Operation.BackupHandler.RunMainOperation(ISnapshotService snapshot, BackendManager backend)

   at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)

   at Duplicati.Library.Main.Controller.<>c__DisplayClass17_0.<Backup>b__0(BackupResults result)

   at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)

   at Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter)

   at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)

Very sorry for the late reply. Haven’t had a chance to mess with this further since last.

Duplicati tries again but is never able to upload anything, it just throws the same error message…

Can you (and @dunnry) let us know what version of Duplicati you’re running and on what OS (Linux, MacOS, Windows)?

Oh, and are you able to use the job menu to Export your job “As commandline” and paste it here (with personal stuff like passwords & email address removed)?

Thanks for getting back JonMIkeIV.

I am running Duplicati v.: 2.0.3.3_beta_2018-04-02
on Windows 10 prof. x64, 1709.

Here is the job exported as commandline:

“C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe” backup “b2://Stationaer/F:\Boot\bg-BG?auth-username=cc&auth-password=**************" "C:\Users*\Pictures\" "C:\Users*\Saved Games\" "C:\Users*\Desktop\" “D:\A Slow March Toward Thought Crime.pdf” “D:\Backup\” “D:\Claus website\” “D:\Interesting academia\” “D:\Musik\” “D:\Musik til sortering\” "C:\Users*\Documents" "C:\Users*\AppData\Roaming” “C:\Users*\Pictures" --backup-name=“Stationaer diverse foldere” --dbpath="C:\Users*\AppData\Local\Duplicati\OMLVYGHVWM.sqlite” --encryption-module=aes --compression-module=zip --dblock-size=50mb --keep-time=90D --passphrase=********** --exclude-files-attributes=system --disable-module=console-password-input"

This is your problem… You put F:\Boot\bg-BG in the “Folder Path” field on the Destination config. It should just be a simple folder name without any slashes. In my case I put the name of the PC there so that I can store multiple PC’s backups int he same B2 bucket. (This keeps the backup data separated.)

1 Like

You were right. I think I actually didn’t put anything and somehow it populated itself, because I certainly don’t know where “F:\Boot\bg-BG” comes from.

It’s chugging along nicely now, thanks for very quick help! Awesome forum! Looking forward to messing about with duplicati some more!

Glad to hear it works now!

I am running 2.0.3.3_beta_2018-04-02 on Windows 10.

Here is exported CLI:

“C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe” backup “b2://my-backupd/C:\Users\Me?auth-username=&auth-password=” “C:\Users\Me\Documents” “C:\Users\Me\Desktop” “S:\2014\” “S:\Vaca Pics\” “S:\video\” --backup-name=MyBackup --dbpath=“C:\Users\Me\AppData\Local\Duplicati\BEYRRYGHAC.sqlite” --encryption-module=aes --compression-module=zip --dblock-size=50GB --passphrase= --retention-policy=“1W:1D,4W:1W,12M:1M” --disable-module=console-password-input

I see the problem now based on the previous replies. I also don’t know how that got there as I didn’t set it. Fixing it now and will see if it work tonight.

I think it will work for you!

I notice you have your dblock size set to 50GB… why is that? I think it will kill deduplication efficiency, but maybe there is a good reason to use that sometimes.

I guess we could check for invalid characters in the UI to avoid this?
I made the change here:

1 Like

In the UI wizard, the dblock size is called ‘Upload volume size’. I had not understood what that meant. I set it to a high value thinking it was the max size for the total backup. What’s the recommended setting? 5 MB?

You are not the first. What should we call that setting to avoid confusion?

The default is 50mb, if you want to decide on another size, look here:

Something like “Upload block size”. I would have understood that ‘block’ was not the total volume. The label ‘Upload volume size’ makes me think it’s the total value.

I am sure you could also put a tool tip or otherwise to explain the de-duplication trade-offs as well as max block limits at cloud providers.

I see now that block size and remote volume block size are two different things. I would call it something like ‘remote volume block size’ and include a link to the article you have.

Great idea. I have changed it to “Remote volume size” and added a small text and a link to the article.

Hopefully that will cut down on the confusion there, but if not I’d suggest not using the word “volume” since that means something very different to many tech people. :wink:

Personally, I’d go with something like “Upload file size” or “Upload archive size”. But that’s just me - and I have no idea how well any of those would translate.

I liked “block size” but I guess I’m weird…

Something so simple, yet hard to get right :confused:.

I have added some help text as well: