Adjustments for Borg 1.2.0 #394

Closed
opened 1 year ago by bjo · 11 comments
bjo commented 1 year ago

Hi,
I think this issue https://github.com/borgbase/vorta/issues/238 also applies to borgmatic, as compact won't be done automatically any more with borg 1.2.0.

Hi, I think this issue https://github.com/borgbase/vorta/issues/238 also applies to borgmatic, as compact won't be done automatically any more with borg 1.2.0.

while playing around with the 1.2 beta and using borgmatic in a venv for automated backups I was wondering if it - while adding adaptations for 1.2 and the new compaction behavior- would be feasible to add a passthrough mode to run verbatim borg commands on the reposiroties configured with borgmatic, making it possible to at least manually run some new borg features on each configured repo with borgmatic setting up the environment correctly each time (passphrases, data paths, ssh args etc). Like

/opt/borgmatic_venv/bin/borgmatic -c /etc/someconfig borg-run break-lock
or
/opt/borgmatic_venv/bin/borgmatic -c /etc/someconfig borg-run compact --cleanup-commits

(borg-run is the first thing I came up with)

The latter imrpving on the current situation with the compaction in borg 1.2, even if integration into the normal backup workflow would still be required I think.

while playing around with the 1.2 beta and using borgmatic in a venv for automated backups I was wondering if it - while adding adaptations for 1.2 and the new compaction behavior- would be feasible to add a passthrough mode to run verbatim borg commands on the reposiroties configured with borgmatic, making it possible to at least manually run some new borg features on each configured repo with borgmatic setting up the environment correctly each time (passphrases, data paths, ssh args etc). Like /opt/borgmatic_venv/bin/borgmatic -c /etc/someconfig borg-run break-lock or /opt/borgmatic_venv/bin/borgmatic -c /etc/someconfig borg-run compact --cleanup-commits (borg-run is the first thing I came up with) The latter imrpving on the current situation with the compaction in borg 1.2, even if integration into the normal backup workflow would still be required I think.
Owner

@bjo: Thanks for bringing this to my attention! Fortunately in my delay to respond, Borg 1.2.0 hasn't been released quite yet...

@juliadin: That's an oft-mentioned feature request, although I don't know that anyone's actually filed it. So I've created a ticket for it here: #425. Feel free to follow along there.

@bjo: Thanks for bringing this to my attention! Fortunately in my delay to respond, Borg 1.2.0 hasn't been released quite yet... @juliadin: That's an oft-mentioned feature request, although I don't know that anyone's actually filed it. So I've created a ticket for it here: #425. Feel free to follow along there.
Owner

#425 with the new borgmatic borg action has been released as part of borgmatic 1.5.15. Docs here: https://torsion.org/borgmatic/docs/how-to/run-arbitrary-borg-commands/

#425 with the new `borgmatic borg` action has been released as part of borgmatic 1.5.15. Docs here: https://torsion.org/borgmatic/docs/how-to/run-arbitrary-borg-commands/
Poster

What's the status of compact? 1.2.0 is in beta meanwhile.

What's the status of `compact`? 1.2.0 is in [beta meanwhile](https://github.com/borgbackup/borg/releases/tag/1.2.0b4).
Owner

There's no specific status—nobody is working on it that I'm aware of. But in the meantime, have you tried borgmatic borg compact?

There's no specific status—nobody is working on it that I'm aware of. But in the meantime, have you tried `borgmatic borg compact`?
Owner
Some discussion on this topic here: https://www.reddit.com/r/BorgBackup/comments/slizrx/borg_120rc1_released/hvu75u5/
witten referenced this issue from a commit 5 months ago
witten referenced this issue from a commit 5 months ago
Owner

A new borgmatic compact action is now implemented in master. It is not (yet) automatically invoked.

A new `borgmatic compact` action is now implemented in master. It is not (yet) automatically invoked.
Owner

Anyone have thoughts on whether borgmatic compact should be run automatically (when no actions are specified)? I assume it should, since otherwise a repository with a Borg 1.2+ client will grow without bound. But I wanted to see if there were any arguments against, e.g. that running compact frequently will be slow.

Anyone have thoughts on whether `borgmatic compact` should be run automatically (when no actions are specified)? I assume it should, since otherwise a repository with a Borg 1.2+ client will grow without bound. But I wanted to see if there were any arguments against, e.g. that running `compact` frequently will be slow.
Owner

I went ahead and integrated compact as a default action. The thinking is that prune won't "work" (actually free up space) without it, and so it would be in line with user expectations to compact whenever automatically running prune. However, if you run prune explicitly (rather than as a default action), you'll still need to compact on your own.

I went ahead and integrated `compact` as a default action. The thinking is that `prune` won't "work" (actually free up space) without it, and so it would be in line with user expectations to `compact` whenever automatically running `prune`. However, if you run `prune` explicitly (rather than as a default action), you'll still need to `compact` on your own.
Owner

Implemented in master. Will be shipped as part of the next release. If there are any details I've missed, please post them here!

Implemented in master. Will be shipped as part of the next release. If there are any details I've missed, please post them here!
witten closed this issue 5 months ago
Owner

This is now released as part of borgmatic 1.5.23.

This is now released as part of borgmatic 1.5.23.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.