Docs: clarify filtering of archives during borg backup pruning#7616
Merged
Conversation
Clarify the retention policy adjustment instructions by mentioning to not include the '-a' or '--glob-archives' option. I recently included in the retention policy env variable, and it lead to a pruning error due to the duplicate `-a` ... `--glob-archives` options. I added it because I didn't know that AIO already filtered archives in the borg repo during pruning, and I was worried that it would prune out other non-Nextcloud-AIO backups in the repo. I added a very similar glob myself, so just omitting what I added was the solution for my problem. As an alternative to this edit, I was thinking that Nextcloud AIO's default filtering behavior could be clarified elsewhere is a positive way. Two ideas: 1. Modify the start of the retention policy FAQ, like: After a backup, AIO prunes your borg archives with the `--glob-archives '*_*-nextcloud-aio'` option, so that it does not affect archives unrelated to AIO. The built-in retention policy is `--keep-within=7d --keep-weekly=4 --keep-monthly=6`. [...] 2. Or perhaps, there can be another FAQ question about backups, like "Will Nextcloud AIO touch other backups in my borg repository?" or "Can I use my borg repository for backups unrelated to Nextcloud AIO?", with the answer: No/Yes, AIO internally uses the borg `--glob-archives '*_*-nextcloud-aio'` option to only prune AIO archives, so Nextcloud AIO will not affect archives/backups unrelated to AIO. Be careful that other systems don't prune your AIO archives, however. Signed-off-by: Thor Galle <[email protected]>
Signed-off-by: Thor Galle <[email protected]>
szaimen
reviewed
Feb 17, 2026
Collaborator
szaimen
left a comment
There was a problem hiding this comment.
Hi, thanks for the PR! :)
I have one suggestion below
Co-authored-by: Simon L. <[email protected]> Signed-off-by: Thor Galle <[email protected]>
Contributor
Author
|
Thanks for reviewing this so quickly! I like the idea of simply linking to this PR for more context, rather than a code line that may get outdated. I'll still add that line in the opening post of this PR for clarification, since it's now used as a reference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clarify the retention policy adjustment instructions by mentioning to not include the '-a' or '--glob-archives' option.
I included
--glob-archives="*-nextcloud-aio"the retention policy env variable, and it lead to a borg pruning error due a the duplicate-a...--glob-archivesoptions. Only one of these options can be provided, since they are the same, and borg doesn't accept duplicates.I added
--glob-archivesto the retention policy because I didn't know that AIO already provided it by default, and I was worried that it would prune out other non-Nextcloud-AIO backups in the repo. The solution was to remove my unnecessary addition.At the moment of writing, these are the default prune options in AIO:
all-in-one/Containers/borgbackup/backupscript.sh
Line 236 in 58e5d85
This PR is the smallest addition I could think of to clarify that filtering is built-in.
As an alternative to this edit, Nextcloud AIO's default filtering behavior could be clarified elsewhere is a positive way.
Two ideas:
Modify the start of the retention policy FAQ answer, like:
Or perhaps, there can be another FAQ question about backups, like "Will Nextcloud AIO touch other backups in my borg repository?" or "Can I use my borg repository for backups unrelated to Nextcloud AIO?", with the answer: