borgbackup / borgbackup/borg

check: does --max-duration really need --repository-only?

Open
#10,025 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13.7k
Forks
875
Avg merge
12h 37m
Merged PRs (30d)
199

Description

Follow-up from #9925 (this thread: https://github.com/borgbackup/borg/pull/9925#discussion_r3682630187).

Right now `borg check --max-duration` requires `--repository-only`. One of the old reasons was that the archives check needed the repository phase to run first so it had a complete repository index to work from.

That is not the case in borg2 anymore. `ArchiveChecker.check` builds its own chunk index with `build_chunkindex_from_repo(...)` in `src/borg/archive.py`, so it does not depend on the repository check having run.

The one reason that still stands is that the archives check has no `max_duration` support, so a time-boxed run can only really cover the repository pack check.

So the open question is whether we keep the requirement (just documented) or drop it and add time-boxing to the archives check too. Filing this so it does not get lost.

Contributor guide

Open the contributing guide

Research direction

Start with the #9925 discussion and read ArchiveChecker.check in src/borg/archive.py, especially its build_chunkindex_from_repo(...) path. Trace how borg check handles --max-duration and --repository-only. Done means deciding whether to retain and document the requirement or remove it while adding time-boxing support for the archives check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.