From 89d201c8fffed6f01e11fc7851202e09a26e41b4 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Wed, 17 Aug 2022 21:54:00 -0700 Subject: [PATCH] Fleshing out NEWS for the Borg 2 changes. --- NEWS | 16 +++++++++------- borgmatic/borg/list.py | 4 ++-- borgmatic/config/normalize.py | 2 +- tests/unit/config/test_normalize.py | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index b20033c..a0505cd 100644 --- a/NEWS +++ b/NEWS @@ -1,18 +1,20 @@ 1.7.0.dev0 * #557: Support for Borg 2 while still working with Borg 1. This includes new borgmatic actions like "rcreate" (replaces "init"), "rlist" (list archives in repository), and "rinfo" (show - repository info). If you install Borg 2, you'll need to manually "borg transfer" or "borgmatic - transfer" your existing Borg 1 repositories before use. See the Borg 2.0 changelog for more - information about Borg 2: https://www.borgbackup.org/releases/borg-2.0.html + repository info). For the most part, borgmatic tries to smooth over differences between Borg 1 + and 2 to make your upgrade process easier. However, there are still a few cases where Borg made + breaking changes, such as moving flags from "borg list" to "borg rlist". See the Borg 2.0 + changelog for more information (https://www.borgbackup.org/releases/borg-2.0.html). If you + install Borg 2, you'll need to manually "borg transfer" or "borgmatic transfer" your existing + Borg 1 repositories before use. * #557: Rename several configuration options to match Borg 2: "remote_rate_limit" is now "upload_rate_limit", "numeric_owner" is "numeric_ids", and "bsd_flags" is "flags". borgmatic still works with the old options. * #557: Remote repository paths without the "ssh://" syntax are deprecated but still supported for - now. However, remote repository paths containing "~" will no longer work. + now. Remote repository paths containing "~" are deprecated in borgmatic and no longer work in + Borg 2. * #557: Omitting the "--archive" flag on the "list" action is deprecated when using Borg 2. Use - the new "rlist" action instead. And when using the "--archive" or "--find" flags on the "list" - action with Borg 2, several flags are no longer supported: "--prefix", "--glob-archives", - "--sort-by", "--first", and "--last". + the new "rlist" action instead. * #565: Fix handling of "repository" and "data" consistency checks to prevent invalid Borg flags. * #566: Modify "mount" and "extract" actions to require the "--repository" flag when multiple repositories are configured. diff --git a/borgmatic/borg/list.py b/borgmatic/borg/list.py index 3c2addb..a13b943 100644 --- a/borgmatic/borg/list.py +++ b/borgmatic/borg/list.py @@ -95,7 +95,7 @@ def list_archive( if not list_arguments.archive and not list_arguments.find_paths: if feature.available(feature.Feature.RLIST, local_borg_version): logger.warning( - 'Omitting the --archive flag on the list action is deprecated when using Borg 2.x. Use the rlist action instead.' + 'Omitting the --archive flag on the list action is deprecated when using Borg 2.x+. Use the rlist action instead.' ) rlist_arguments = argparse.Namespace( @@ -117,7 +117,7 @@ def list_archive( for flag_name in ('prefix', 'glob-archives', 'sort-by', 'first', 'last'): if getattr(list_arguments, flag_name.replace('-', '_'), None): raise ValueError( - f'The --{flag_name} flag on the list action is not supported when using the --archive/--find flags and Borg 2.x.' + f'The --{flag_name} flag on the list action is not supported when using the --archive/--find flags and Borg 2.x+.' ) if list_arguments.json: diff --git a/borgmatic/config/normalize.py b/borgmatic/config/normalize.py index 19cf5e9..a43bb30 100644 --- a/borgmatic/config/normalize.py +++ b/borgmatic/config/normalize.py @@ -60,7 +60,7 @@ def normalize(config_filename, config): dict( levelno=logging.WARNING, levelname='WARNING', - msg=f'{config_filename}: Repository paths containing "~" are deprecated in borgmatic and no longer work in Borg 2.', + msg=f'{config_filename}: Repository paths containing "~" are deprecated in borgmatic and no longer work in Borg 2.x+.', ) ) ) diff --git a/tests/unit/config/test_normalize.py b/tests/unit/config/test_normalize.py index 93508ec..6088244 100644 --- a/tests/unit/config/test_normalize.py +++ b/tests/unit/config/test_normalize.py @@ -74,8 +74,8 @@ from borgmatic.config import normalize as module True, ), ( - {'location': {'repositories': ['ssh://foo@bar/repo']}}, - {'location': {'repositories': ['ssh://foo@bar/repo']}}, + {'location': {'repositories': ['ssh://foo@bar:1234/repo']}}, + {'location': {'repositories': ['ssh://foo@bar:1234/repo']}}, False, ), ),