# Quota size check to not be exceeded

**URL:** <https://forum.duplicati.com/t/quota-size-check-to-not-be-exceeded/17268>\
**Category:** Developer\
**Created:** [January 4, 2024, 1:36pm UTC](https://forum.duplicati.com/t/quota-size-check-to-not-be-exceeded/17268 "2024-01-04T13:36:11Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Kanellaman](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kanellaman/32/8555_2.png) [@Kanellaman](https://forum.duplicati.com/u/Kanellaman)\
**Post date:** [January 8, 2024, 1:56pm UTC](https://forum.duplicati.com/t/quota-size-check-to-not-be-exceeded/17268/10 "2024-01-08T13:56:17Z")

</div>

> [@ts678](#):
>
> I’m still not sure what this means, but I’ll point to one quota enhancement that’s already a pull request.

Sorry for not clarifying.  
I want to dynamically get the size remaining of my remote server (I will do it manually by having a file that writes the disk size left of the server----Duplicati will read this file to get this size).  
–quota-size is static

> [@ts678](#):
>
> I’m not sure which quota you’re talking about.

I am thinking an implementation which I will add a new variable -not sure where yet as I am brainstorming.

```plaintext
....
while(1){
  file_to_be_uploaded = get_file_from_ready_to_upload_queue)
  if(size_left is not defined)
    size_left = get_KB_left_from_server()
  If (size(file_to_be_uploaded) > size_left)
     Dont upload the file and stop the backup
  else
    Push the file to the upload queue
}
......

```

> [@ts678](#):
>
> Its one process has lots of threads that sometimes have to synchronize.

I thought a process represents one thread(Only one instance runs the code block that takes the files ready to be uploaded and inserts them to the queue). That is my understanding of the explanation below.

> [@Alternative FTP failure?](https://forum.duplicati.com/t/alternative-ftp-failure/7822/10):
>
> - A `process` traverses the file system and writes paths to a `channel`
> - A `process` reads paths and checks if the metadata has changed; all changed paths are written to another `channel`
> - Multiple `processes` read paths and computes block hashes; new block hashes (and data) are written to a `channel`
> - Multiple `processes` read blocks and compresses blocks; filled volumes are written as upload requests
> - A `process` caps the number of active uploads
> - A `process` performs the spill pickup (as described above)
> - A `process` performs the remote operations (upload, download, list)

My thought was to add the psuedocode I provided before to the phase `A `process` caps the number of active uploads`, given that only one process-thread does this job to avoid race condition.  
Are there any misconceptions to my interprentation?

---

_[View the full topic](https://forum.duplicati.com/t/quota-size-check-to-not-be-exceeded/17268)._
