1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-04 06:21:46 +00:00

create: more Highlander options, fixes #6269

This commit is contained in:
Thomas Waldmann 2023-04-06 17:01:54 +02:00
parent 315f312bb2
commit 645b0088c5
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -763,6 +763,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
metavar="NAME", metavar="NAME",
dest="stdin_name", dest="stdin_name",
default="stdin", default="stdin",
action=Highlander,
help="use NAME in archive for stdin data (default: %(default)r)", help="use NAME in archive for stdin data (default: %(default)r)",
) )
subparser.add_argument( subparser.add_argument(
@ -770,6 +771,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
metavar="USER", metavar="USER",
dest="stdin_user", dest="stdin_user",
default=None, default=None,
action=Highlander,
help="set user USER in archive for stdin data (default: do not store user/uid)", help="set user USER in archive for stdin data (default: do not store user/uid)",
) )
subparser.add_argument( subparser.add_argument(
@ -777,6 +779,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
metavar="GROUP", metavar="GROUP",
dest="stdin_group", dest="stdin_group",
default=None, default=None,
action=Highlander,
help="set group GROUP in archive for stdin data (default: do not store group/gid)", help="set group GROUP in archive for stdin data (default: do not store group/gid)",
) )
subparser.add_argument( subparser.add_argument(
@ -785,6 +788,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
dest="stdin_mode", dest="stdin_mode",
type=lambda s: int(s, 8), type=lambda s: int(s, 8),
default=STDIN_MODE_DEFAULT, default=STDIN_MODE_DEFAULT,
action=Highlander,
help="set mode to M in archive for stdin data (default: %(default)04o)", help="set mode to M in archive for stdin data (default: %(default)04o)",
) )
subparser.add_argument( subparser.add_argument(
@ -804,6 +808,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
) )
subparser.add_argument( subparser.add_argument(
"--paths-delimiter", "--paths-delimiter",
action=Highlander,
metavar="DELIM", metavar="DELIM",
help="set path delimiter for ``--paths-from-stdin`` and ``--paths-from-command`` (default: \\n) ", help="set path delimiter for ``--paths-from-stdin`` and ``--paths-from-command`` (default: \\n) ",
) )
@ -878,6 +883,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
dest="comment", dest="comment",
type=comment_validator, type=comment_validator,
default="", default="",
action=Highlander,
help="add a comment text to the archive", help="add a comment text to the archive",
) )
archive_group.add_argument( archive_group.add_argument(
@ -886,6 +892,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
dest="timestamp", dest="timestamp",
type=timestamp, type=timestamp,
default=None, default=None,
action=Highlander,
help="manually specify the archive creation date/time (yyyy-mm-ddThh:mm:ss[(+|-)HH:MM] format, " help="manually specify the archive creation date/time (yyyy-mm-ddThh:mm:ss[(+|-)HH:MM] format, "
"(+|-)HH:MM is the UTC offset, default: local time zone). Alternatively, give a reference file/directory.", "(+|-)HH:MM is the UTC offset, default: local time zone). Alternatively, give a reference file/directory.",
) )
@ -896,6 +903,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
dest="checkpoint_interval", dest="checkpoint_interval",
type=int, type=int,
default=1800, default=1800,
action=Highlander,
help="write checkpoint every SECONDS seconds (Default: 1800)", help="write checkpoint every SECONDS seconds (Default: 1800)",
) )
archive_group.add_argument( archive_group.add_argument(
@ -904,6 +912,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
dest="checkpoint_volume", dest="checkpoint_volume",
type=int, type=int,
default=0, default=0,
action=Highlander,
help="write checkpoint every BYTES bytes (Default: 0, meaning no volume based checkpointing)", help="write checkpoint every BYTES bytes (Default: 0, meaning no volume based checkpointing)",
) )
archive_group.add_argument( archive_group.add_argument(
@ -923,6 +932,7 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser):
dest="compression", dest="compression",
type=CompressionSpec, type=CompressionSpec,
default=CompressionSpec("lz4"), default=CompressionSpec("lz4"),
action=Highlander,
help="select compression algorithm, see the output of the " '"borg help compression" command for details.', help="select compression algorithm, see the output of the " '"borg help compression" command for details.',
) )