Orphaned objects check skipped (needs all archives checked). #734

Closed
opened 2023-07-30 21:11:41 +00:00 by xLogiiCx · 6 comments

What I'm trying to do and why

Hi, when using borgmatic and the --only archives the "Orphaned object check" gets skipped, because of the --glob-archives * option in the borg command. Is this intended? Where does the * come from and i it is * why even parse the option?

Following are the what i think important parts of the config file that might lead to this (tell me if you need more):

# Name of the archive. Borg placeholders can be used. See the output
# of "borg help placeholders" for details. Defaults to
# "{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}". When running actions like
# rlist, info, or check, borgmatic automatically tries to match only
# archives created with this name format.
archive_name_format: '{now}'

# A Borg pattern for filtering down the archives used by borgmatic
# actions that operate on multiple archives. For Borg 1.x, use a shell
# pattern here and see the output of "borg help placeholders" for
# details. For Borg 2.x, see the output of "borg help match-archives".
# If match_archives is not specified, borgmatic defaults to deriving
# the match_archives value from archive_name_format.
# match_archives: sh:{hostname}-*

Steps to reproduce

No response

Actual behavior

No response

Expected behavior

No response

Other notes / implementation ideas

No response

borgmatic version

1.8.0

borgmatic installation method

yay -S borg borgmatic

Borg version

borg 1.2.4

Python version

Python 3.11.3

Database version (if applicable)

No response

Operating system and version

EndeavourOS Linux x86_64 6.4.7-zen1-1-zen

### What I'm trying to do and why Hi, when using borgmatic and the `--only archives` the "Orphaned object check" gets skipped, because of the `--glob-archives *` option in the borg command. Is this intended? Where does the ` *` come from and i it is ` *` why even parse the option? Following are the what i think important parts of the config file that might lead to this (tell me if you need more): ``` # Name of the archive. Borg placeholders can be used. See the output # of "borg help placeholders" for details. Defaults to # "{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}". When running actions like # rlist, info, or check, borgmatic automatically tries to match only # archives created with this name format. archive_name_format: '{now}' # A Borg pattern for filtering down the archives used by borgmatic # actions that operate on multiple archives. For Borg 1.x, use a shell # pattern here and see the output of "borg help placeholders" for # details. For Borg 2.x, see the output of "borg help match-archives". # If match_archives is not specified, borgmatic defaults to deriving # the match_archives value from archive_name_format. # match_archives: sh:{hostname}-* ``` ### Steps to reproduce _No response_ ### Actual behavior _No response_ ### Expected behavior _No response_ ### Other notes / implementation ideas _No response_ ### borgmatic version 1.8.0 ### borgmatic installation method yay -S borg borgmatic ### Borg version borg 1.2.4 ### Python version Python 3.11.3 ### Database version (if applicable) _No response_ ### Operating system and version EndeavourOS Linux x86_64 6.4.7-zen1-1-zen
Owner

The --glob-archives * flag passed to Borg is almost certainly coming from the archive_name_format: '{now}' option. Specifically, borgmatic is likely interpreting the {now} as an "ephemeral data placeholder" and replacing it with a * when constructing the Borg command and selecting the archives to check. You can read more about this feature here, including the rationale for it: https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/#archive-filtering

So do you have any suggestions for a solution here? For instance, maybe borgmatic could be made smart enough to omit --glob-archives when the value would be *? That would solve your particular use case now, but it wouldn't necessarily solve it if archive_name_format changed.

Thanks!

The `--glob-archives *` flag passed to Borg is almost certainly coming from the `archive_name_format: '{now}'` option. Specifically, borgmatic is likely interpreting the `{now}` as an "ephemeral data placeholder" and replacing it with a `*` when constructing the Borg command and selecting the archives to check. You can read more about this feature here, including the rationale for it: https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/#archive-filtering So do you have any suggestions for a solution here? For instance, maybe borgmatic could be made smart enough to omit `--glob-archives` when the value would be `*`? That would solve your particular use case now, but it wouldn't necessarily solve it if `archive_name_format` changed. Thanks!
Author

For borgmatic it would be the best option to omit if if its '*' i guess.
but i see the problem almost more with borg than with borgmatic so maybe i should open an issue there?

For borgmatic it would be the best option to omit if if its '*' i guess. but i see the problem almost more with borg than with borgmatic so maybe i should open an issue there?
Owner

Sounds good. And yeah, if that's unexpected/undesired behavior in Borg, opening an issue at least to ask about it may not be a bad idea. Feel free to link it here if you do.

Sounds good. And yeah, if that's unexpected/undesired behavior in Borg, opening an issue at least to ask about it may not be a bad idea. Feel free to link it here if you do.
Author
https://github.com/borgbackup/borg/issues/7752
Owner

This is implemented in main and will be part of the next release! Thanks for filing this.

This is implemented in main and will be part of the next release! Thanks for filing this.
Owner

Just released in borgmatic 1.8.1!

Just released in borgmatic 1.8.1!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#734
No description provided.