-
-
Notifications
You must be signed in to change notification settings - Fork 755
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
borg 1.x: add length limit to archivename_validator? #8594
Comments
borg 1.x creates checkpoint archives named checkpoint archives won't be migrated to borg2 (no need to do that, we just migrate the final/full archive, not the incomplete checkpoint archive). |
This is not stated in the documentation for "Just migrate final/full archive" covers one case, but there can be checkpoint archives that never completed, so Why no final archive?
|
I have borg1 repos with a few archive names that extend to over 200chars ( #8322 ). Those need to be handled, when...
For the latter: maybe preserving the full archive name in otherwise, stripping parts from an archive name may create many archives with the identical string, like: use case: my borg1 archives end mostly with the time stamp ( (For the sake of simplicity: renaming/shortening archive names prior |
I don't want to make transfer more complex than it already is (like by adding archive renaming). The (likely few) users with exceedingly long archive names will have to shorten them (e.g. by using borg rename) before transferring to borg2 (in any case, and if we add the limit to borg 1.x, then also before upgrading to these versions). I also don't like dirty hacks like abusing the comment field for other metadata. About the .checkpoint archives: this is rarely a problem, but we can't completely rule it out:
It has to be documented that borg transfer does not transfer checkpoint archives and will reject archives that do not pass metadata validation (e.g. due to issues in names or comments, see the validator code). Please make a separate PR for this. The fix for THIS issue will need some changelog entry / upgrade notes entry and maybe there should be a version bump to e.g. borg 1.5 to indicate that there might be a bit more to do than in just a 1.4.x patch release. The main idea about doing that in 1.x at all is that users are better prepared for borg2 and do not continue to create archives that would make troubles when transferring them to borg2. |
archivename_validator
: master branch has a length limit there, but 1.4-maint branch doesn't.maybe it would be good to also have the limit in borg 1.x, to avoid issues when migrating to borg2.
even though the validator has no limit yet in borg 1.x, guess that didn't mean arbitrarily long archive names "just worked".
E.g. when mounting a borg repo, the archive names are used as directory names and on Linux NAME_MAX is 255, so a directory name can't be longer than that.
Update: I noticed that this is a bit more than just the length limit of archive names. IIRC comments length might also be different and also accepted content for names / comments. One has to check the metadata validators borg2 uses currently.
The text was updated successfully, but these errors were encountered: