1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-27 02:08:54 +00:00

recreate --recompress: add metavar, clarify description

(cherry picked from commit c0f56ed039)
This commit is contained in:
Thomas Waldmann 2018-03-09 18:33:15 +01:00
parent a48fffad6e
commit 337c86b470

View file

@ -3757,12 +3757,17 @@ def define_archive_filters_group(subparser, *, sort_by=True, first_last=True):
type=CompressionSpec, default=CompressionSpec('lz4'),
help='select compression algorithm, see the output of the '
'"borg help compression" command for details.')
archive_group.add_argument('--recompress', dest='recompress', nargs='?', default='never', const='if-different',
choices=('never', 'if-different', 'always'),
help='recompress data chunks according to ``--compression`` if `if-different`. '
'When `always`, chunks that are already compressed that way are not skipped, '
'but compressed again. Only the algorithm is considered for `if-different`, '
'not the compression level (if any).')
archive_group.add_argument('--recompress', metavar='MODE', dest='recompress', nargs='?',
default='never', const='if-different', choices=('never', 'if-different', 'always'),
help='recompress data chunks according to ``--compression``. '
'MODE `if-different`: '
'recompress if current compression is with a different compression algorithm '
'(the level is not considered). '
'MODE `always`: '
'recompress even if current compression is with the same compression algorithm '
'(use this to change the compression level). '
'MODE `never` (default): '
'do not recompress.')
archive_group.add_argument('--chunker-params', metavar='PARAMS', dest='chunker_params',
type=ChunkerParams, default=CHUNKER_PARAMS,
help='specify the chunker parameters (CHUNK_MIN_EXP, CHUNK_MAX_EXP, '