-
-
Notifications
You must be signed in to change notification settings - Fork 743
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
Advanced filtering for borg prune #5720
Comments
Doing something based on comments seems bad, in general. At some other places, borg supports selection based on archive name prefix or name match. Keeping all of a day: would make the time based code of prune more complex to implement and also more hard to understand how it works - not a fan of that considering we get issue reports all the time from people suspecting that it doesn't work correctly. Why would you like to keep all of one day? |
I understand, but I'm really have this scenario. I do sometimes partial backup with only selected folders, and I need for them common-style snapshot names becouse of my backup restore scenario/scripts, so the only place to store additional meta data is comments. I do backup multiple mysql databases (via |
I would not like "comments as metadata". If you want more metadata, open a separate issue about allowing tags or custom k/v metadata. This is rather something for a future moin release. For moin 1.1.x I can see us implementing something along the lines what we already have elsewhere in borg, so no totally new concepts. Not sure if we have suffix somewhere, but iirc we have pattern match on archive names. |
If you just use a different PREFIX for your multiple mysql backups, you can already handle this with existing borg prune featureset. |
The "implicit compact_segments takes time" issue might soon be solvable, after borg 1.2 is released (2021). |
Yes, "comments as metadata" is not good, but it works already now. Any additional changes will take time, and may be I'm the only person who need this. It's ok to filter suffix via regexp to me, but it will be good to have it as commandline parameter too. Should I open additional issue for that? Do you plan to release stable 1.2 release soon? I mean few weeks or it can take more time? |
suffix would be a new feature (IIRC), feel free to open a separate issue to discuss it. 1.2rc1 will come in the next weeks, see there: https://github.com/borgbackup/borg/milestone/75 |
One more reason to have ability to filter snapshots for prune by some additional metadata: on https://borgbackup.readthedocs.io/en/stable/quickstart.html there are examples with In real life it is not possible reliable use any symbols in snapsot name as a separator. |
See #8379 about a new feature "backup series" - always using the same name and doing a precise match on that name, e.g. for prune. |
See #8425 about tags. |
What is the best way to do filtering of snapshots to prune with
borg prune
based on comments, suffix, dates without times?Example snapshot list
--stdin
)Real scenarios I'd like to implement with snapshots:
Are any better ways then
borg prune --dry-run ... | grep ... | xargs borg delete
for scenario 2 and 3 and do manual delete in some script based onborg list
for the first scenario ?The text was updated successfully, but these errors were encountered: