Solution to B2 Cloud Error: File name must not contain '\' on Windows

Error Description

  • Duplicati version: Duplicati - 2.0.2.1_beta_2017-08-01
  • OS version: Windows 10 Pro x64 Build 16299
  • Cloud storage: Backblaze B2 Cloud

In windows the file path may contain ‘\’ instead of ‘/’ in unix. This will generates a 400 error from B2 Cloud API and duplicati will cease back-up process.

Possible Solution bia Built-in Commandline Interface

I recommend testing the following configurations in the built-in “commandline” interface first. Because the arguments you parsed to commandline is not permanent and won’t damage your configuration file. If those modification works, then you can put then into configuration, as shown in next section.

First, click on the back-up profile under “Home” page to expand it, then click "commandline " under “Advanced”. In the next page, you can find all the source folders specified by you during the setup under “Commandline arguments”. You just need to replace all ‘’ with ‘/’. Also, do the same replacing in “Target URL”, otherwise Duplicati may report an error like cannot find the database.

Next, go to the end of this page and click the button “Run ‘backup’ command now”.

I only have one PC and this solution works for me, and if it also solves your 400 error, you can follow the next section to store those settings in your configuration so that you don’t need to manually specify them via “commandline”.

“Permanent” Fix

Next, go to “Home” page and click “Edit” under “Configuration” for your back-up profile. Click the second circle on the head of this page to go to “Destination”. Under the section “Backup destination” there’s an argument “Folder path”. You need to replace all “” with “/”. (This is corresponding to the “Target URL” argument in commandline interface.)

Then, click the third circle on the top to go to “Source Data” page. There’re three vertical dots on the right to the section title “Source Data”. Click it and then click “Show advanced editor” in the drop-down menu. Now you need to replace all “” with “/” in the huge text box for “Source folder” argument.

NOTICE: These changes are not saved yet. To save it, go to the last page “Options” and click “save” button on the end of this page.

Hello @doctorHu, and welcome to the forum and thank-you for your suggestion on fixing the File name must not contain '\' error!

(By the way, our forum software was hiding your backslash so I edited your post so it shows correctly.)

Thx Jon. I’ve edited this post and included instructions on how to save those changes in configuration so the fix becomes permanent.

Thanks for that! Since I can’t flag the first post as the solution I made it your 2nd one - just so it gets the “solved” status in searches. :slight_smile: