# Backend quota exceeded (I know it's been covered, but...)

**URL:** https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488
**Category:** Support
**Created:** [July 11, 2023, 10:03am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488 "2023-07-11T10:03:57Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![pmd](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pmd](https://forum.duplicati.com/u/pmd)
#### Post date: [July 11, 2023, 10:03am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/1 "2023-07-11T10:03:57Z")

</div>

Hi folks,

I know this topic has been covered many times but I’ve read through every instance without success. I was previously using an attached drive, with no problems. However, for obvious reasons, I wanted my backups to be remote - but I’m not in a position to fork out for that - so I came up with the solution of backing up via usb cable to a folder in my android phone (which is permanently with me and has plenty of space). Now, however, although every job is listed as successfully completed it results in the following error:

**[Error-Duplicati.Library.Main.Operation.FilelistProcessor-BackendQuotaExceeded]: Backend quota has been exceeded: Using 103.17 GB of 0 bytes (0 bytes available)**

There is more than 300GB of free space on the phone, and I have it allocated as a ‘local folder or drive’ which, while connected, it is. I’ve checked my logs for errors, and the backend statistics show no errors other than **“ReportedQuotaError”: true** , and I’m also baffled by the “total” and “free” quota space - please see below:

**“TotalQuotaSpace”: 0,**  
**“FreeQuotaSpace”: 0,  
“AssignedQuotaSpace”: -1,  
“ReportedQuotaError”: true,  
“ReportedQuotaWarning”: false,  
“MainOperation”: “Backup”,  
“ParsedResult”: “Success”,**

OS is Linux Mint. Any help greatly appreciated.  
pmd

---

<div class="post-metadata">

### Author: ![gpatel-fr](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gpatel-fr](https://forum.duplicati.com/u/gpatel-fr)
#### Post date: [July 11, 2023, 12:03pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/2 "2023-07-11T12:03:08Z")

</div>

For a disk backend, the quota is the available space reported by the operating system.  
So if you have mounted your backend on, say, /backup , what says df /backup ?

---

<div class="post-metadata">

### Author: ![pmd](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pmd](https://forum.duplicati.com/u/pmd)
#### Post date: [July 11, 2023, 1:16pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/3 "2023-07-11T13:16:15Z")

</div>

Hi gpatel,

Here’s what I get:

Filesystem 1K-blocks Used Available Use% Mounted on  
gvfsd-fuse 990119916 175546404 814573512 18%

Note that it’s 500GB internal storage (where I backup to) and 500GB SD Card. The fre space free internal storage is actually 334GB.

Hope this is of use.

Regards,  
pmd

---

<div class="post-metadata">

### Author: ![gpatel-fr](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gpatel-fr](https://forum.duplicati.com/u/gpatel-fr)
#### Post date: [July 11, 2023, 1:34pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/4 "2023-07-11T13:34:52Z")

</div>

Do you run Duplicati **as a user**? Fuse mounts are a bit tricky.

---

<div class="post-metadata">

### Author: ![pmd](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pmd](https://forum.duplicati.com/u/pmd)
#### Post date: [July 11, 2023, 2:41pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/5 "2023-07-11T14:41:23Z")

</div>

Crikey, gpatel, that had never even occurred to me.

It’s my personal PC and I boot login as administrator but I may be just a user after that (although I can access anything with root privileges with the appropriate password).

I’ve finished for today (long story) but will check tomorrow and get back to you. Should I be accessing it as a user or not? And how do I check / change it if necessary?

Really appreciate your time.  
pmd

---

<div class="post-metadata">

### Author: ![Jojo-1000](https://forum.duplicati.com/user_avatar/forum.duplicati.com/jojo-1000/32/8262_2.png) [@Jojo-1000](https://forum.duplicati.com/u/Jojo-1000)
#### Post date: [July 11, 2023, 3:38pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/6 "2023-07-11T15:38:33Z")

</div>

I can reproduce this on linux. Android uses MTP to transfer files, so it is mounted as a fuse mount.  
This is a problem with Mono. `System.IO.DriveInfo.GetDrives()` finds the folder above the mount point (`/run/user/1000/gvfs/`), and that returns 0 for the sizes (also with `df`):

```plaintext
/: AvailableFreeSpace 6145687552, DriveFormat ext, DriveType Fixed, IsReady True, RootDirectory /, TotalFreeSpace 7420743680, TotalSize 25859465216, VolumeLabel /
/run/user/1000/gvfs: AvailableFreeSpace 0, DriveFormat fuse, DriveType Ram, IsReady True, RootDirectory /run/user/1000/gvfs, TotalFreeSpace 0, TotalSize 0, VolumeLabel /run/user/1000/gvfs

```

The correct mount point would be `/run/user/1000/gvfs/mtp:host=XXX/`. `df -a` also does not list this mount, but specifying the path directly works. I tried to put the correct path in the `DriveInfo` constructor, but that also falls back to the parent directory. I am not sure what we can do about this. Maybe add a check that total size is zero and disable quota warnings?  
It seems that mono uses [statvfs](https://www.man7.org/linux/man-pages/man3/statvfs.3.html) to get the statistics, so it may even be something in that library function.

> <https://github.com/mono/mono/blob/59a40d68879b69416f15a1d78198483cddda8cc0/mono/metadata/w32file-unix.c#L4381>

---

<div class="post-metadata">

### Author: ![gpatel-fr](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gpatel-fr](https://forum.duplicati.com/u/gpatel-fr)
#### Post date: [July 11, 2023, 4:31pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/7 "2023-07-11T16:31:36Z")

</div>

> [@Jojo-1000](#):
>
> It seems that mono uses [statvfs](https://www.man7.org/linux/man-pages/man3/statvfs.3.html) to get the statistics, so it may even be something in that library function.

or it may be unrelated to mono, but to the fact that MTP is not an USB file system. See for example this blog post:

> **[File sizes and disk usage - Hugo Peixoto](https://hugopeixoto.net/articles/2020-05-06.html)**
>
> I was backing up my old phone through MTP and went down a filesystem and disk rabbit hole.

the relevant quote being:

```plaintext
jmtpfs does not support reporting blocks, because MTP hides fs details by design. It always sets st_blocks=0, which makes du unable to report disk usage in blocks.

```

so disabling quota warnings if reported size is zero seems just as well indeed.

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [July 12, 2023, 1:39am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/8 "2023-07-12T01:39:14Z")

</div>

Automatically ignoring values that seem kind of insane (e.g. 0) is nice, but providing a manual option to turn off quota might be the best way to bypass the mono bug. Using `df` or doing system calls is messy.

---

<div class="post-metadata">

### Author: ![pmd](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pmd](https://forum.duplicati.com/u/pmd)
#### Post date: [July 12, 2023, 8:42am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/9 "2023-07-12T08:42:19Z")

</div>

All this help is really appreciated, folks, but I confess you are already exceeding my Linux knowledge.

From what I think I understand of your respective responses, mono / statvfs is reporting an error despite the fact that there is actually nothing wrong with my backups. Do you all agree that is the case because, if so, I’m happy to just carry on receiving that error after each backup, and ignoring it.

---

<div class="post-metadata">

### Author: ![pmd](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pmd](https://forum.duplicati.com/u/pmd)
#### Post date: [July 12, 2023, 9:03am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/10 "2023-07-12T09:03:05Z")

</div>

All this help is really appreciated, folks, but I confess you are already exceeding my Linux knowledge.

From what I think I understand of your respective responses, mono / statvfs is reporting an error despite the fact that there is actually nothing wrong with my backups. Do you all agree that is the case because, if so, I’m happy to just carry on receiving that error after each backup, and ignoring it.

---

<div class="post-metadata">

### Author: ![pmd](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pmd](https://forum.duplicati.com/u/pmd)
#### Post date: [July 12, 2023, 9:08am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/11 "2023-07-12T09:08:40Z")

</div>

All this help is really appreciated, @gpatel-fr @ts678 @Jojo-1000, but I confess you are already exceeding my Linux knowledge.

From what I think I understand of your respective responses, mono / statvfs is reporting an error despite the fact that there is actually nothing wrong with my backups. Do you all agree that is the case because, if so, I’m happy to just carry on receiving that error after each backup, and ignoring it.

---

<div class="post-metadata">

### Author: ![gpatel-fr](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gpatel-fr](https://forum.duplicati.com/u/gpatel-fr)
#### Post date: [July 12, 2023, 11:36am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/12 "2023-07-12T11:36:41Z")

</div>

> [@pmd](#):
>
> there is actually nothing wrong with my backups. Do you all agree that is the case

Yes that’s exactly what I think, discussion was more about finding a way to work around this limitation in a future release.

---

<div class="post-metadata">

### Author: ![pmd](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pmd](https://forum.duplicati.com/u/pmd)
#### Post date: [July 12, 2023, 11:51am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/13 "2023-07-12T11:51:41Z")

</div>

Thanks @gpatel-fr - @Jojo-1000 and @ts678, are you in agreement?  
pmd

---

<div class="post-metadata">

### Author: ![Jojo-1000](https://forum.duplicati.com/user_avatar/forum.duplicati.com/jojo-1000/32/8262_2.png) [@Jojo-1000](https://forum.duplicati.com/u/Jojo-1000)
#### Post date: [July 12, 2023, 2:32pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/15 "2023-07-12T14:32:16Z")

</div>

> [@pmd](#):
>
> Thanks @gpatel-fr - @Jojo-1000 and @ts678, are you in agreement?

As far as I can tell, this is only an error message and it does not stop any of the backup processes. In my tests the files were copied properly (you should also see that files are there in your target folder).

> [@ts678](#):
>
> providing a manual option to turn off quota might be the best way to bypass the mono bug

I remember there was an issue about showing the size of the wrong mounting point. Maybe we could disable quota checks completely if `--quota-warning-threshold=-1`, and also if the total free space is 0 (because that seems to be the signal by mono that it can’t get the stats). I think we can reuse the flag because if you disable the error, you probably don’t want to get a warning either (unless you find this too confusing).

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [July 12, 2023, 4:00pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/16 "2023-07-12T16:00:55Z")

</div>

OK, I found some numbers, but they look odd. Total’s nearly a thousand GB. Is it a combined value?  
On Ubuntu 22.04, df (and everything) gives me only 0s for `/run/user/1000/gvfs`. I don’t have `mtp`.

> [@pmd](#):
>
> Filesystem 1K-blocks Used Available Use% Mounted on  
> gvfsd-fuse 990119916 175546404 814573512 18%
> 
> Note that it’s 500GB internal storage (where I backup to) and 500GB SD Card. The fre space free internal storage is actually 334GB.

Expected behavior of a setup like this is unknown to me. The available here looks about 500 GB high, meaning we can’t trust it even if we could get it, if it’s actually true that 334GB is the available amount.

```plaintext
  --quota-size (Size): A reported maximum storage
    This value can be used to set a known upper limit on the amount of space a
    backend has. If the backend reports the size itself, this value is
    ignored

```

The last sentence IMO has too much trust in the backend and subsequent reporting code, especially if destination is [Local folder or drive](https://duplicati.readthedocs.io/en/latest/05-storage-providers/#local-folder-or-drive) simulated by who-knows-what-mechanism. There’s an old issue for

> <https://github.com/duplicati/duplicati/issues/1301>
>
> Currently quota-size option is ignored when a backend reports how much space the…re is left. This is suboptimal as users may wish to use backend for other purposes, e.g. Drive Storage is also used to keep GMail messages. Please allow to force quota limit via an additional option.
> 
> P.S. This is related to issue #550 as this (hopefully) simple solution may be used as a workaround.
> \## 
> 
> 
> \<bountysource-plugin\>
> \---
> Want to back this issue? \*\*\[Post a bounty on it!\](https://www.bountysource.com/issues/8636142-allow-forcing-the-quota?utm\_campaign=plugin&utm\_content=tracker%2F4870652&utm\_medium=issues&utm\_source=github)\*\* We accept bounties via \[Bountysource\](https://www.bountysource.com/?utm\_campaign=plugin&utm\_content=tracker%2F4870652&utm\_medium=issues&utm\_source=github).
> \</bountysource-plugin\>

and if this were allowed, perhaps it would provide a general way out of a predicament like the current.

> [@Jojo-1000](#):
>
> I remember there was an issue about showing the size of the wrong mounting point.

[Backup Quota Warning Error #4970](https://github.com/duplicati/duplicati/issues/4970) has some comment but is waiting for information from originator.

[Backend quota has been exceeded after apparently successful backup](https://forum.duplicati.com/t/backend-quota-has-been-exceeded-after-apparently-successful-backup/5352/5) has earlier technical analysis.

> [@pmd](#):
>
> Do you all agree that is the case because, if so, I’m happy to just carry on receiving that error after each backup, and ignoring it.

There might be other short-term solutions, e.g. rather than use media transfer protocol, use a network.  
There appear to be FTP (somewhat insecure unless encrypted) and SSH servers you can investigate.

---

<div class="post-metadata">

### Author: ![Jojo-1000](https://forum.duplicati.com/user_avatar/forum.duplicati.com/jojo-1000/32/8262_2.png) [@Jojo-1000](https://forum.duplicati.com/u/Jojo-1000)
#### Post date: [July 12, 2023, 5:08pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/17 "2023-07-12T17:08:51Z")

</div>

So I now have these ideas:

1. `--quota-size` overrides reported value from backend.  
I don’t even think this option works currently, it only sets `AssignedQuotaSpace` which is never used to create a warning or error.
2. `--quota-size-override` to do this with a new option instead
3. `--quota-size` should probably be used instead to specify the maximum size of all Duplicati-created files, and create a warning when the threshold is met (in addition to the reported backend quota). I think if this is exceeded, we still complete backups and only show an error. That might fill up the space, but at least it won’t suddenly stop making backups.
4. `--quota-warning-threshold=-1` to disable quota warnings and errors
5. `--quota-disable` to do this with a new option instead  
Here we could also have `--quota-disable=all` and `--quota-disable=reported` to still have the manual quota size and ignore the reported quota which might be wrong. Or maybe only disable the reported quota and have the user remove `--quota-size` to disable that as well.

I think I would prefer to do 3 and 5, so that `--quota-size` does something meaningful in all cases (although not compatible with the quoted description, as I said currently it does nothing) and there is also the option to disable the quotas.  
Manually specifying the full backend size (as opposed to only Duplicati files) will not work so easily, because if the reporting does not work we can’t know how much of that is used by other files.  
@gpatel-fr @ts678 do you agree with me? Then I am going to implement this.

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [July 12, 2023, 7:37pm UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/18 "2023-07-12T19:37:38Z")

</div>

> [@Jojo-1000](#):
>
> I don’t even think this option works currently, it only sets `AssignedQuotaSpace` which is never used to create a warning or error.

It looks like it never worked in Duplicati 2. I traced help text source to a comment as of Duplicati 1.3.4.

> [@Jojo-1000](#):
>
> Manually specifying the full backend size (as opposed to only Duplicati files) will not work so easily, because if the reporting does not work we can’t know how much of that is used by other files.

Good point. An equivalent definition when destination has no quota information is to limit Duplicati use, following similar semantics (which I might have wrong, so read the code) for warning, and error at limit.

For the needs of the issue I linked, one can do the same thing by giving less than the full backend size.

```plaintext
  --quota-warning-threshold (Integer): Threshold for warning about low quota
    Sets a threshold for when to warn about the backend quota being nearly
    exceeded. It is given as a percentage, and a warning is generated if the
    amount of available quota is less than this percentage of the total
    backup size. If the backend does not report the quota information, this
    value will be ignored
    * default value: 10

```

Duplicati could do math to figure out the above, maybe something using `Complete log` names

```plaintext
      "UnknownFileSize": 0,
      "KnownFileSize": 4002,
      "TotalQuotaSpace": 999618043904,
      "FreeQuotaSpace": 317370253312,
      "AssignedQuotaSpace": -1,

```

In manual override mode, `TotalQuotaSpace` comes from `--quota-size` which is taken when given.

`TotalQuotaSpace` = `AssignedQuotaSpace` `--quota-size`  
“total backup size” = `KnownFileSize` + `UnknownFileSize`  
`FreeQuotaSpace` = `TotalQuotaSpace` - “total backup size”

I prefer to stick near current behavior (fixed as necessary), and limit the number of interacting options.  
There’s no manual section on quotas, but I guess having options be alphabetical helps to group them.  
Sort of the “as simple as possible but not simpler” plan. I suppose one could go study reported issues.

> [@Jojo-1000](#):
>
> I think I would prefer to do 3 and 5, so that `--quota-size` does something meaningful in all cases (although not compatible with the quoted description, as I said currently it does nothing) and there is also the option to disable the quotas.

I think what I detailed is 3? I’m not sure 5 is needed, especially in two flavors. Starting to get confusing. Disabling quota should also not be encouraged by offering an option. Again, one could research some. Who’s asking for it, and why? If it’s available, then used, how messy does it get when space exhausts?

---

<div class="post-metadata">

### Author: ![gpatel-fr](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@gpatel-fr](https://forum.duplicati.com/u/gpatel-fr)
#### Post date: [July 13, 2023, 6:32am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/19 "2023-07-13T06:32:29Z")

</div>

> [@Jojo-1000](#):
>
> will not work so easily, because if the reporting does not work we can’t know how much of that is used by other files.  
> @gpatel-fr

I’d say that any complicated fix for a bug that is not a Duplicati bug in the first place seems a strange idea to me in the first place. If I was bothering for that I’d go for a disabling flag with a one-liner change.

---

<div class="post-metadata">

### Author: ![pmd](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pmd](https://forum.duplicati.com/u/pmd)
#### Post date: [July 13, 2023, 8:03am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/20 "2023-07-13T08:03:25Z")

</div>

> [@ts678](#):
>
> The available here looks about 500 GB high, meaning we can’t trust it even if we could get it, if it’s actually true that 334GB is the available amount.

Hi @ts678 . Remember, that’s the whole phone (500 GB internal - where I backup to - and 500 GB SD card). I did try to df just the internal storage but it reported no such file or directory. However, all the backup files are in the internal folder where I directed them. I’m now assuming that the error report is false and am ignoring it and continuing with that method - unless you think that’s a bad idea?  
pmd  
@Jojo-1000 @gpatel-fr

---

<div class="post-metadata">

### Author: ![Jojo-1000](https://forum.duplicati.com/user_avatar/forum.duplicati.com/jojo-1000/32/8262_2.png) [@Jojo-1000](https://forum.duplicati.com/u/Jojo-1000)
#### Post date: [July 13, 2023, 9:45am UTC](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488/21 "2023-07-13T09:45:08Z")

</div>

> [@gpatel-fr](#):
>
> I’d say that any complicated fix for a bug that is not a Duplicati bug in the first place seems a strange idea to me in the first place.

I don’t think this is too complicated, also since `--quota-size` does not work at all right now.  
My suggestion is:

- Make `--quota-size` work in addition to the reported backend quota, but only for Duplicati files. This way it could also be used to monitor the backup size itself.
- Add a flag to disable the reported quota in case it is wrong
- Disable quota for local files if total size is 0

The help could be as simple as

```plaintext
--quota-size (Size): Limit storage use
Set a limit to the total amount of storage used on the backend. This is in addition to the full backend quota, if available.
Note: Backups will continue past the quota. This only creates warnings and error messages.

--quota-disable: Disable backend quota
Disable the quota reported by the backend. --quota-size can still be used to set a manual quota.

```

However, @ts678 thinks that a new option to disable is unnecessary and instead `--quota-size` should replace the reported quota if present.

Here is a scenario:

- I back up to a drive (1TB) that is 50% full with video games
- I only want Duplicati to use 200GB because I want to have space left. I could calculate this with `--quota-warning-threshold`, but that is complicated so I set `--quota-size` instead.
- I install another 400 GB of games on the drive. Duplicati now only has 100GB to work with, but a quota of 200GB.
- If the quota size flag replaces the reported quota, it will try to completely fill up the drive without a warning and fail at some point once it is full.

This is why I want the flag to be in addition, rather than replace the reported quota. The flag to disable quota is then only needed if there is some bug with it (for example it reports the wrong mount point).

[Next page](https://forum.duplicati.com/t/backend-quota-exceeded-i-know-its-been-covered-but/16488.md?page=2)
