-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: limit repo size #65
Comments
This is similar to #50 I think. But I'm also interested in this. I would even implement it. My main question is how to trade off efficiency and accuracy? For example, limiting the size of a (Oh, and this would necessarily cause a backup to be "corrupt" in the sense that a Any thoughts on this, @fd0? |
I think it's a nice feature to have, although I'm not sure how many people will actually use it (at least you two) ;) At the start, we need to scan the repo and sum all file sizes, e.g. by using These are my thoughts so far. |
@fd0 @dotlambda See https://github.com/mholt/rest-server/pull/1 for my implementation. It requires #67 so I made the PR to my own fork so the diff was more focused. Note that it will require to stop retrying if the server responds with a status code of 507 (Insufficient Storage). (Well, not strictly -- but it would be polite.) |
I think that an error response like According to RFC 4918:
Being out of quota is not temporary: the current backup cannot complete and resources need to be freed first. RFC 7231:
This is assumed to be permanent by default. I'm not sure if 413 would be the right one here, as the restic client might want to use that one in the future to detect request size limits. Alternatively, maybe 400 can be used with a special header. |
@wojas I forgot about 413 -- thanks! I've pushed an update that uses 413 instead of 507. |
@fd0 or other collaborator: Would you be able to give https://github.com/mholt/rest-server/pull/1 a once-over as well? Then I think it will be smoother to merge #67. (I know you're busy with the new archiver, I just didn't want this to slip though.) |
Sure, thanks for the reminder. I'm using https://octobox.io now to keep track of things I still need to do, works great :) |
Hi. Does the current implementation of --max-size limits the size for all repositories combined, or one can limit available disk space on per-repo basis? |
I'd like to host a REST server for multiple users and I don't want them to use up all of my server's disk space.
So it would be nice to be able limit the overall disk space the repos take, i.e. the recursive size of
--path
.Furthermore, I'd optimally be able to set different repo sizes for different users.
The text was updated successfully, but these errors were encountered: