1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-01 12:45:34 +00:00

rcreate: more Highlander options, fixes #6269

This commit is contained in:
Thomas Waldmann 2023-04-06 17:26:31 +02:00
parent 13e99033cb
commit 21a3a95cc8
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -1,6 +1,6 @@
import argparse
from ._common import with_repository, with_other_repository
from ._common import with_repository, with_other_repository, Highlander
from ..cache import Cache
from ..constants import * # NOQA
from ..crypto.key import key_creator, key_argument_names, tam_required_file
@ -184,6 +184,7 @@ def build_parser_rcreate(self, subparsers, common_parser, mid_common_parser):
dest="other_location",
type=location_validator(other=True),
default=Location(other=True),
action=Highlander,
help="reuse the key material from the other repository",
)
subparser.add_argument(
@ -193,6 +194,7 @@ def build_parser_rcreate(self, subparsers, common_parser, mid_common_parser):
dest="encryption",
required=True,
choices=key_argument_names(),
action=Highlander,
help="select encryption key mode **(required)**",
)
subparser.add_argument(
@ -210,6 +212,7 @@ def build_parser_rcreate(self, subparsers, common_parser, mid_common_parser):
dest="storage_quota",
default=None,
type=parse_storage_quota,
action=Highlander,
help="Set storage quota of the new repository (e.g. 5G, 1.5T). Default: no quota.",
)
subparser.add_argument(