Support for Borg 2 #557
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Borg 2 is currently in beta, and has a number of breaking changes that borgmatic will need to support:
borg transferto transition 1.x repositories to the new 2.0 repo format.-rflag instead of::syntax:prunecompactcreatecheckextractexport-tarmountumountrestorelistinfoborg--prefixwith--glob-archives, e.g.--glob-archives 'myprefix*'.prunecheckinforlistlist::syntax.--glob-archivesflag with a glob matching multiple archives for certain Borg sub-commands, e.g.borg delete --glob-archives 'myarchive*'orborg recreate --glob-archives 'myarchive*'.ssh://.init->rcreatelist->rlistinfo->rinfoprunecompactcreatecheckextractexport-tarmountumountrestorelistinfoborgborg rcreate --other-repoflag and any additional new flags.borg upgradehas been removed. (Wasn't wrapped by borgmatic.)borg compact --cleanup-commitsflag has been removed. (Going to leave it in place. If a user uses it with borgmatic and Borg 2, they'll get the same error they'll get when they use--cleanup-commitswith Borg 2 directly.)--remote-ratelimitwith--upload-ratelimit. Renameremote_rate_limitconfiguration option toupload_rate_limitas well.--numeric-ownerwith--numeric-ids. Renamenumeric_ownerconfiguration option tonumeric_idsas well.--nobsdflagswith--noflags. Renamebsd_flagsconfiguration option to `flags as well.--noatime(the default now) with--atime. Fortunately, the configuration option is alreadyatime.Full changelog: https://borgbackup.readthedocs.io/en/2.0.0b1/changes.html#version-2-0-0b1-2022-08-08
Discussion tickets: https://github.com/borgbackup/borg/discussions/6952 and https://github.com/borgbackup/borg/discussions/6799.
It's unclear at this point if the right approach is a breaking change release (e.g. borgmatic 2) that only supports Borg 2 ... or somehow make one version of borgmatic that supports both Borg 1.x and 2 simultaneously.
Also unclear on this. Best to wait for the actual changes. For now the new arguments aren't finalized. Were just discussing on what to do with archive names today. They don't add a whole lot of value currently.
Okay, good to know! Given how much borgmatic does its own thing with repository/archive syntax, it wouldn't be impossible to map that to whatever Borg settles on.
With Borg 2 in beta, I began work on this in a branch. My current hypothesis is that borgmatic can support both Borg 1 and 2 simultaneously with the same version of code. Whether that approach remains feasible depends on how things go with the rest of the implementation. If it turns out that it's too much of a hassle, then I'll instead make a breaking change release that only supports Borg 2.
Great list! Adjusted it a bit for use with Vorta: https://github.com/borgbase/vorta/issues/1366
How do you plan on getting the Borg version at the very start? Vorta runs
borg versionand then we have a dict of available features. https://github.com/borgbase/vorta/blob/master/src/vorta/borg/_compatibility.pyYeah, borgmatic is already running
borg versionin a similar manner on start with feature lookup inspired by that Vorta code! See: https://projects.torsion.org/borgmatic-collective/borgmatic/src/branch/borg-2/borgmatic/borg/feature.pyUnrelated edit: I neglected to properly tag the following changesets with this ticket number:
cc04bf57df89d201c8ffMerged to master! This will be part of the next release. Documentation on transferring repositories is here: https://torsion.org/borgmatic/docs/how-to/upgrade/#upgrading-borg
borgmatic changelog (such as it is) is here: https://projects.torsion.org/borgmatic-collective/borgmatic/src/branch/master/NEWS
Just released in borgmatic 1.7.0!
Congrats! Need to look at that commit how you ended up supporting 2 versions.