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