Skip to content
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

setting storage_quota to 0 (unlimited) cli doesnt work #8499

Open
someone-somenet-org opened this issue Oct 29, 2024 · 4 comments
Open

setting storage_quota to 0 (unlimited) cli doesnt work #8499

someone-somenet-org opened this issue Oct 29, 2024 · 4 comments
Labels
Milestone

Comments

@someone-somenet-org
Copy link

Have you checked borgbackup docs, FAQ, and open GitHub issues?

Yes.

Is this a BUG / ISSUE report or a QUESTION?

Bug + Docs issue.

System information. For client/server mode post info for both machines.

Your borg version (borg -V).

borg 1.2.8

Operating system (distribution) and version.

Platform: Linux t480.l 6.10.11+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.11-1~bpo12+1 (2024-10-03) x86_64

Describe the problem you're observing.

The docs say:

The repository quota size is reached, what can I do?
The simplest solution is to increase or disable the quota and resume the backup:

borg config /path/to/repo storage_quota 0

but running borg config . storage_quota 0
gives me:

someone@localhost ~/test % borg config . storage_quota 0 
Local Exception
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 5401, in main
    exit_code = archiver.run(args)
                ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 5321, in run
    return set_ec(func(args))
                  ^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 190, in wrapper
    return method(self, args, repository=repository, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 2032, in do_config
    validate(section, name, args.value)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 1944, in repo_validate
    raise ValueError('Invalid value: storage_quota < 10M')
ValueError: Invalid value: storage_quota < 10M

Platform: Linux t480.l 6.10.11+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.11-1~bpo12+1 (2024-10-03) x86_64
Linux: Unknown Linux  
Borg: 1.2.8  Python: CPython 3.11.2 msgpack: 1.0.3 fuse: pyfuse3 3.2.1 [pyfuse3,llfuse]
PID: 601581  CWD: /home/someone/test
sys.argv: ['/usr/bin/borg', 'config', '.', 'storage_quota', '0']
SSH_ORIGINAL_COMMAND: None

When i do borg config . storage_quota -d then borg config . -l shows

[repository]
version = 1
segments_per_dir = 1000
max_segment_size = 524288000
storage_quota = False
additional_free_space = 0
append_only = 0

Which is not the default of 0 and possibly has unknown implications later on.

@ThomasWaldmann
Copy link
Member

Yeah, looks like there is a bug there.

That check for less than 10M was added late because people forgot the "M" and set their repos to unpractically low quota (assuming that borg defaults to some big unit if no unit is given).

Guess it was overlooked that 0 is a useful value for disabling the quota.

@ThomasWaldmann
Copy link
Member

BTW, borg config is a bit problematic and maybe superfluous anyway:

  • it is only for local repos as we can't allow config access to remote repos (repo admin might not want users changing the config)
  • if it is a local repo, you can of course also carefully edit repository_directory/config - it is a text file. use a text editor like nano, mcedit, vim.

@ThomasWaldmann ThomasWaldmann added this to the 1.4.1 milestone Oct 29, 2024
@someone-somenet-org
Copy link
Author

config_read_only=True for remote repos?

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Oct 29, 2024

The "problem" is that when using a borg repo via ssh, the repository code is executed LOCALLY on the server.

Also, considering that borg2 will work very differently anyway, I don't think there will be any "new features" in borg config in 1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants