borg icon indicating copy to clipboard operation
borg copied to clipboard

Extend initial storage quota

Open lucnap opened this issue 7 years ago • 16 comments

How can I extend initial storage quota? borg init --storage-quota 4G after some backups I need more space how to have a repository 8G for example?

lucnap avatar Jul 02 '18 17:07 lucnap

either use borg config or carefully edit your repo/config.

ThomasWaldmann avatar Jul 02 '18 17:07 ThomasWaldmann

guess this is solved.

ThomasWaldmann avatar Jul 08 '18 13:07 ThomasWaldmann

Hello, the borg config command or manually editing the config file on the server side does not work in my case. I still have a quota error on the client side. Is there a client side cache to clear?

Thank you!

Ravinou avatar Oct 31 '22 11:10 Ravinou

Clientside cache: no (IIRC)

Can you give what you have in your repo config (remove the encryption key, if any)?

ThomasWaldmann avatar Nov 03 '22 14:11 ThomasWaldmann

Hi @ThomasWaldmann , I'm currently working on a UI for a central borg repository (that I will publish soon in opensource on my github) so I can give you all the information you ask me because I am in test conditions.

So, in my repo config I have :

[repository]
version = 1
segments_per_dir = 1000
max_segment_size = 524288000
append_only = 0
storage_quota = 1000000000
additional_free_space = 0
id = eecfcbcd81e0cf5850bd9c429f0e6eaa3363d98b7816a3c6ff012f2ec8a24c74
key = XXXXXXXXXXXX

I test this command :

borg config /home/XXXX/repo storage_quota 3000000000

Now I have this config :

[repository]
version = 1
segments_per_dir = 1000
max_segment_size = 524288000
append_only = 0
storage_quota = 3000000000
additional_free_space = 0
id = eecfcbcd81e0cf5850bd9c429f0e6eaa3363d98b7816a3c6ff012f2ec8a24c74
key = XXXX

But when I try to launch a borg createI have this : The storage quota (1.00 GB) has been exceeded (1.01 GB). Try deleting some archives.

Ravinou avatar Nov 03 '22 16:11 Ravinou

Please add the borg version you use, client and server.

ThomasWaldmann avatar Nov 03 '22 16:11 ThomasWaldmann

borg 1.1.16 on client side and server side.

OS : Debian 11.5

Ravinou avatar Nov 03 '22 16:11 Ravinou

I tried with 1.1.16 and I can't reproduce. If I edit the repo config and increase the quota, it immediately gets reflected by the client.

ThomasWaldmann avatar Nov 03 '22 17:11 ThomasWaldmann

What is command on the client ? Did you launch a simple borgbackup create like me ?

Ravinou avatar Nov 03 '22 17:11 Ravinou

I used borg create -v --stats REMOTEREPO::archive sourcedir.

The -v will give some addtl. quota info.

ThomasWaldmann avatar Nov 03 '22 17:11 ThomasWaldmann

Are you sure you edit the correct repo config?

ThomasWaldmann avatar Nov 03 '22 17:11 ThomasWaldmann

Oh sorry @ThomasWaldmann I just find the solution !!

My software uses the command system in authorized_keys. But my command contains the --storage-quota option. It is this command that is actually important, and it is logical because it is launched at the user's connection. When I change the option in authorized_keys there is no change in the config file but it is perfectly functional, good to know.

I've been working for several days on all these aspects and I had forgotten that I was passing the quota option with the repository restriction here. So I was stubbornly looking for a solution with borg config when the solution was in authorized_keys because it's my usage...

Really sorry, and a huge thank you for your feedback that allowed me to look elsewhere.

Hoping that my experience will be useful to others :)

Thanks again @ThomasWaldmann ♥

Ravinou avatar Nov 03 '22 17:11 Ravinou

Ah, right, that option has higher priority than the repo config. Did not think about it right now either. :-)

ThomasWaldmann avatar Nov 03 '22 17:11 ThomasWaldmann

Maybe you could check the docs whether they somehow mention that.

ThomasWaldmann avatar Nov 03 '22 17:11 ThomasWaldmann

While searching the documentation I found the answer here : "The active quota of a repository is determined by the storage_quota config entry or a run-time override (via borg serve)."

But I admit that I had to read between the lines and I would find it more interesting if the "priority" terms came out as you so well said. IMOO

And maybe also an addition here would be interesting: https://borgbackup.readthedocs.io/en/stable/deployment/hosting-repositories.html

Finally, in this part of the documentation, I assume that the term "override" means that the option does have priority over the config. I didn't understand it that way either.

It's my personal opinion on a point of detail in the documentation that led me to the error. But otherwise the documentation of Borg is extremely complete and well done. I always found my answers there :)

Ravinou avatar Nov 03 '22 18:11 Ravinou

Guess we both are not native english speakers. Maybe somebody who is can advise on that.

Would the "has priority over" wording be better than "override"?

ThomasWaldmann avatar Nov 03 '22 20:11 ThomasWaldmann