What does --quota-size?

I see no difference if parameter is set or not?!?

A webdav terracloud target:

KnownFileSize:      6361845701 <== Higher
TotalQuotaSpace: 0
FreeQuotaSpace: 0
AssignedQuotaSpace: 4294967296 <== than this

No messages, no warnings, no errors   

Also tried a test local backup. 780KB. Then added --quota-size=“1MB” and added some files. The Backup is now 1,3 MB. It still reports “success”.

"C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe" backup "file://z:\temp\dupli" "c:\temp\\" --backup-name="Test" --dbpath="C:\Users\xxxxx\AppData\Local\Duplicati\WSZQTYYJRL.sqlite" --encryption-module="aes" --compression-module="zip" --dblock-size="50mb" --passphrase="asdf" --quota-size="1MB"

Backup started at 17.02.2018 11:47:40
Checking remote backup ...
  Listing remote folder ...
Scanning local files ...
  33 files need to be examined (5,39 MB)
  0 files need to be examined (0 Bytes)
Checking remote backup ...
  Listing remote folder ...
removing file listed as Temporary: duplicati-b7e049208f6ff4a53ae4f805613741a9b.dblock.zip.aes
removing file listed as Temporary: duplicati-i6ef237dd16c74a44bcf4c5a46963b144.dindex.zip.aes
Verifying remote backup ...
Remote backup verification completed
  Downloading file (2,42 KB) ...
  Downloading file (2,87 KB) ...
  Downloading file (930,36 KB) ...
  Duration of backup: 00:00:02
  Remote files: 9
  Remote size: 1,13 MB
  Files added: 0
  Files deleted: 0
  Files changed: 0
  Data uploaded: 0 Bytes
  Data downloaded: 935,65 KB
Backup completed successfully!

So what should this parameter do?

A search for --quota-size shows a few topics where it’s discussed. Did none of them (like this one) answer your question?

I have read that before. But what I haven’t understood (and I still do not understand it), what means

it is currently only used as a placeholder if the destination doesn’t report one.

The commandline help says something similar

If the backend reports the size itself, this value is ignored

So what is done with the quota if the destination reports one and if not the quota-size is used. But for what?

The option is used to set “how much space does the destination allow”.
Some backends (file-based, Google Drive, etc) reports this number automatically, while others (e.g. AWS S3) has no such concept, and would need the number set manually.

Currently it does not do anything (assuming you are on the beta release).

Recently a feature was added that supports warning you if you get close to the limit:

1 Like

And if I use a backend like file-based or Google Drive the --quota-size will still be ignored?

So it won’t be possible to get a warning if a backup exceed a defined amount of space (eg. if a Backup grows and exceeds 10GB, no matter how much free space we have)?

Not until the quota warning feature kenkendk linked to is rolled, no.

I’ve had a look at the code change of this feature. There is a new quota-warning-threshold (a percent value) and I have this line in code:

if (quota.FreeQuotaSpace < warningThreshold * knownFileSize)

BUT: this line is only reached for quota enabled Backends (File, GoogleService, OneDrive) AND for this 3 types the FREE SPACE is used and not the --quota-size-Parameter.

So I still do not know what the quota-size-Parameter does (also not in the new implementation). And I still believe that it would not be possible to get a warning if a backup exceeds a defined size. The new warning only comes if the free spaces gets to low. That is not the same as if a backup exceeds a defined amount.

I haven’t reviewed the code myself, but in the sample line you provided the property name FreeQuotaSpace to me implies it’s the difference between backup size and quota size - not that it’s raw “free space”.

That being said, the description of --quota-size is:

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

To me this means that Quota is being treated like total space available, just as you describe.

Again, I’ve not looked at the code but if --quota-size is only used for certain providers even if it’s specified in the parameters, then that’s an issue that should be addressed. Either through re-coding or updating the parameter description to make it clear it only works with certain providers.

Perhaps you could use the current --quota-size code as a starting point for adding a new parameter, maybe something like --max-backup-size that can be set independently of quota AND backend.

With something like that in play one could even start adjusting retention rules to start pruning older stuff only once the “max backup size” limit is reached. :slight_smile: