Add a --list option #61
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#61
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Additionatlly to
--check --prune --create
add a--list
option that does aborg list
for all configured repos.Also add as default action to be run after as the last action.
If you are positive on that idea, but lack the time, I might me able to help you on that.
I could see the utility in this, and in fact manually running
borg list
is something I find myself doing occasionally. The only reason I've hesitated thus far with adding a--list
flag to borgmatic is that there are a ton of other borg sub-commands (info
,mount
,init
, etc). So if we add--list
, where do we draw the line?Note that I'm not at all opposed to adding
--list
.. It just makes me start thinking about where this will lead.Thoughts?
I understand your thoughts about were to draw the line. What should borgmatic as a wrapper do?
The standard use case of borg is certainly to backup and prune, borgmatic covers these.
Main advantages of borgmatic are imho:
For which borg actions is this especially useful?
init
you just do one and you give very special options.mount
hardly makes sense for multiple repos and also requires special option, such as mount point.delete
maybe makes sense, but I think its also more non-standard use.info
is a clear candidate for inclusion, because its useful for logging unsupervised backup.list
.The standard use case of borgmatic is unsupervised backup, prune, check. Because of the unsupervised nature, logging is important. For the logging I see a clear benefit of having
list
andinfo
actions in borgmatic. It gives you a quick overview about the backup state.My idea of implementation of
list
is to simply runborg list
on all configured repos, maybe with some borgmatic specific configuration added, such as config file andsource_directories
.Just my thoughts ;-)
Best Regards!
Thanks, that's well-reasoned and makes sense to me. I'll start with a
--list
option.I just implemented
--list
and--info
. Note that I didn't call either of these by default, as I figured that would be unexpected if the verbosity level is low. But you can easily invoke them manually via the borgmatic command-line. This feature will go out in the next release.This has just been released as part of borgmatic 1.2.0!
That's a very welcome addition. Would it be too much to allow for the
--json
flavor of it?Maybe adding the new borgmatic command line options
--list-json
and--info-json
would be easier to implement, rather than detecting the combination of--list
and--json
.What's your view on this? I could give it a go an provide a pull request
Using the Python
argparse
library that borgmatic's already using, it would actually be pretty easy to detect the combination of--list
and--json
. And I think that makes for a little nicer command-line interface.Feel free to give it a go if you like!