# 400 - bad\_request: File names must not contain '\\'

**URL:** https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523
**Category:** Support
**Created:** [May 11, 2018, 2:38pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523 "2018-05-11T14:38:45Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Beatwolf](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@Beatwolf](https://forum.duplicati.com/u/Beatwolf)
#### Post date: [May 11, 2018, 2:38pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/1 "2018-05-11T14:38:46Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [May 16, 2018, 1:43am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/2 "2018-05-16T01:43:41Z")

</div>

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.)

---

<div class="post-metadata">

### Author: ![dunnry](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/d/c6cbf5/32.png) [@dunnry](https://forum.duplicati.com/u/dunnry)
#### Post date: [June 5, 2018, 8:59pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/3 "2018-06-05T20:59:36Z")

</div>

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)
> 
> ```

---

<div class="post-metadata">

### Author: ![Beatwolf](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@Beatwolf](https://forum.duplicati.com/u/Beatwolf)
#### Post date: [June 6, 2018, 9:33am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/4 "2018-06-06T09:33:54Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [June 6, 2018, 7:25pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/5 "2018-06-06T19:25:34Z")

</div>

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)?

---

<div class="post-metadata">

### Author: ![Beatwolf](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@Beatwolf](https://forum.duplicati.com/u/Beatwolf)
#### Post date: [June 6, 2018, 9:14pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/6 "2018-06-06T21:14:07Z")

</div>

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"

---

<div class="post-metadata">

### Author: ![drwtsn32](https://forum.duplicati.com/user_avatar/forum.duplicati.com/drwtsn32/32/2591_2.png) [@drwtsn32](https://forum.duplicati.com/u/drwtsn32)
#### Post date: [June 6, 2018, 9:22pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/7 "2018-06-06T21:22:03Z")

</div>

> [@Beatwolf](#):
>
> b2://Stationaer/F:\Boot\bg-BG

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.)

---

<div class="post-metadata">

### Author: ![Beatwolf](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@Beatwolf](https://forum.duplicati.com/u/Beatwolf)
#### Post date: [June 6, 2018, 9:40pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/8 "2018-06-06T21:40:16Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![drwtsn32](https://forum.duplicati.com/user_avatar/forum.duplicati.com/drwtsn32/32/2591_2.png) [@drwtsn32](https://forum.duplicati.com/u/drwtsn32)
#### Post date: [June 7, 2018, 1:31am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/9 "2018-06-07T01:31:56Z")

</div>

Glad to hear it works now!

---

<div class="post-metadata">

### Author: ![dunnry](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/d/c6cbf5/32.png) [@dunnry](https://forum.duplicati.com/u/dunnry)
#### Post date: [June 7, 2018, 2:04am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/10 "2018-06-07T02:04:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![drwtsn32](https://forum.duplicati.com/user_avatar/forum.duplicati.com/drwtsn32/32/2591_2.png) [@drwtsn32](https://forum.duplicati.com/u/drwtsn32)
#### Post date: [June 7, 2018, 3:15am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/11 "2018-06-07T03:15:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)
#### Post date: [June 7, 2018, 9:41am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/12 "2018-06-07T09:41:07Z")

</div>

> [@drwtsn32](#):
>
> You put F:\Boot\bg-BG in the “Folder Path” field on the Destination config.

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

> <https://github.com/duplicati/duplicati/commit/af3e9cdfdc5efce82e77971ca7752ea727cb9249>

---

<div class="post-metadata">

### Author: ![dunnry](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/d/c6cbf5/32.png) [@dunnry](https://forum.duplicati.com/u/dunnry)
#### Post date: [June 7, 2018, 11:47am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/13 "2018-06-07T11:47:39Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)
#### Post date: [June 7, 2018, 11:55am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/14 "2018-06-07T11:55:54Z")

</div>

> [@dunnry](#):
>
> 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?

> [@dunnry](#):
>
> What’s the recommended setting? 5 MB?

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

> **[Choosing Sizes in Duplicati](https://www.duplicati.com/articles/Choosing-Sizes/)**
>
> This article describes the tradeoffs involved in picking the sizes of blocks and volumes in Duplicati.

---

<div class="post-metadata">

### Author: ![dunnry](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/d/c6cbf5/32.png) [@dunnry](https://forum.duplicati.com/u/dunnry)
#### Post date: [June 7, 2018, 12:12pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/15 "2018-06-07T12:12:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dunnry](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/d/c6cbf5/32.png) [@dunnry](https://forum.duplicati.com/u/dunnry)
#### Post date: [June 7, 2018, 12:20pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/16 "2018-06-07T12:20:05Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)
#### Post date: [June 7, 2018, 12:54pm UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/17 "2018-06-07T12:54:23Z")

</div>

> [@dunnry](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [June 8, 2018, 12:18am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/18 "2018-06-08T00:18:43Z")

</div>

> [@kenkendk](#):
>
> 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. 😉

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.

---

<div class="post-metadata">

### Author: ![drwtsn32](https://forum.duplicati.com/user_avatar/forum.duplicati.com/drwtsn32/32/2591_2.png) [@drwtsn32](https://forum.duplicati.com/u/drwtsn32)
#### Post date: [June 8, 2018, 4:44am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/19 "2018-06-08T04:44:32Z")

</div>

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

---

<div class="post-metadata">

### Author: ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)
#### Post date: [June 8, 2018, 6:10am UTC](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523/20 "2018-06-08T06:10:48Z")

</div>

Something so simple, yet hard to get right 😕.

I have added some help text as well:

> <https://github.com/duplicati/duplicati/commit/4e94c5a3318b5e0835efc16175c0cb8264e1646a>

[Next page](https://forum.duplicati.com/t/400-bad-request-file-names-must-not-contain/3523.md?page=2)
