|
@@ -664,34 +664,37 @@ class Archiver:
|
|
|
def do_benchmark_crud(self, args):
|
|
|
"""Benchmark Create, Read, Update, Delete for archives."""
|
|
|
def measurement_run(repo, path):
|
|
|
- archive = repo + '::borg-benchmark-crud'
|
|
|
compression = '--compression=none'
|
|
|
# measure create perf (without files cache to always have it chunking)
|
|
|
t_start = time.monotonic()
|
|
|
- rc = self.do_create(self.parse_args(['create', compression, '--files-cache=disabled', archive + '1', path]))
|
|
|
+ rc = self.do_create(self.parse_args([f'--repo={repo}::borg-benchmark-crud1', 'create',
|
|
|
+ compression, '--files-cache=disabled', path]))
|
|
|
t_end = time.monotonic()
|
|
|
dt_create = t_end - t_start
|
|
|
assert rc == 0
|
|
|
# now build files cache
|
|
|
- rc1 = self.do_create(self.parse_args(['create', compression, archive + '2', path]))
|
|
|
- rc2 = self.do_delete(self.parse_args(['delete', archive + '2']))
|
|
|
+ rc1 = self.do_create(self.parse_args([f'--repo={repo}::borg-benchmark-crud2', 'create',
|
|
|
+ compression, path]))
|
|
|
+ rc2 = self.do_delete(self.parse_args([f'--repo={repo}::borg-benchmark-crud2', 'delete']))
|
|
|
assert rc1 == rc2 == 0
|
|
|
# measure a no-change update (archive1 is still present)
|
|
|
t_start = time.monotonic()
|
|
|
- rc1 = self.do_create(self.parse_args(['create', compression, archive + '3', path]))
|
|
|
+ rc1 = self.do_create(self.parse_args([f'--repo={repo}::borg-benchmark-crud3', 'create',
|
|
|
+ compression, path]))
|
|
|
t_end = time.monotonic()
|
|
|
dt_update = t_end - t_start
|
|
|
- rc2 = self.do_delete(self.parse_args(['delete', archive + '3']))
|
|
|
+ rc2 = self.do_delete(self.parse_args([f'--repo={repo}::borg-benchmark-crud3', 'delete']))
|
|
|
assert rc1 == rc2 == 0
|
|
|
# measure extraction (dry-run: without writing result to disk)
|
|
|
t_start = time.monotonic()
|
|
|
- rc = self.do_extract(self.parse_args(['extract', '--dry-run', archive + '1']))
|
|
|
+ rc = self.do_extract(self.parse_args([f'--repo={repo}::borg-benchmark-crud1', 'extract',
|
|
|
+ '--dry-run']))
|
|
|
t_end = time.monotonic()
|
|
|
dt_extract = t_end - t_start
|
|
|
assert rc == 0
|
|
|
# measure archive deletion (of LAST present archive with the data)
|
|
|
t_start = time.monotonic()
|
|
|
- rc = self.do_delete(self.parse_args(['delete', archive + '1']))
|
|
|
+ rc = self.do_delete(self.parse_args([f'--repo={repo}::borg-benchmark-crud1', 'delete']))
|
|
|
t_end = time.monotonic()
|
|
|
dt_delete = t_end - t_start
|
|
|
assert rc == 0
|
|
@@ -3200,6 +3203,8 @@ class Archiver:
|
|
|
'compatible file can be generated by suffixing FILE with ".pyprof".')
|
|
|
add_common_option('--rsh', metavar='RSH', dest='rsh',
|
|
|
help="Use this command to connect to the 'borg serve' process (default: 'ssh')")
|
|
|
+ add_common_option('--repo', metavar='REPO', dest='location', type=location_validator(),
|
|
|
+ help="repository to use") # XXXYYY
|
|
|
|
|
|
def define_exclude_and_patterns(add_option, *, tag_files=False, strip_components=False):
|
|
|
add_option('-e', '--exclude', metavar='PATTERN', dest='patterns',
|
|
@@ -3263,8 +3268,7 @@ class Archiver:
|
|
|
|
|
|
def define_borg_mount(parser):
|
|
|
parser.set_defaults(func=self.do_mount)
|
|
|
- parser.add_argument('location', metavar='REPOSITORY_OR_ARCHIVE', type=location_validator(),
|
|
|
- help='repository or archive to mount')
|
|
|
+ # archive name
|
|
|
parser.add_argument('--consider-checkpoints', action='store_true', dest='consider_checkpoints',
|
|
|
help='Show checkpoint archives in the repository contents list (default: hidden).')
|
|
|
parser.add_argument('mountpoint', metavar='MOUNTPOINT', type=str,
|
|
@@ -3427,10 +3431,6 @@ class Archiver:
|
|
|
help='benchmarks borg CRUD (create, extract, update, delete).')
|
|
|
subparser.set_defaults(func=self.do_benchmark_crud)
|
|
|
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to use for benchmark (must exist)')
|
|
|
-
|
|
|
subparser.add_argument('path', metavar='PATH', help='path were to create benchmark input data')
|
|
|
|
|
|
bench_cpu_epilog = process_epilog("""
|
|
@@ -3460,9 +3460,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='break repository and cache locks')
|
|
|
subparser.set_defaults(func=self.do_break_lock)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository for which to break the locks')
|
|
|
|
|
|
# borg check
|
|
|
check_epilog = process_epilog("""
|
|
@@ -3545,9 +3542,7 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='verify repository')
|
|
|
subparser.set_defaults(func=self.do_check)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default='',
|
|
|
- type=location_validator(),
|
|
|
- help='repository or archive to check consistency of')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('--repository-only', dest='repo_only', action='store_true',
|
|
|
help='only perform repository checks')
|
|
|
subparser.add_argument('--archives-only', dest='archives_only', action='store_true',
|
|
@@ -3595,9 +3590,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='compact segment files / free space in repo')
|
|
|
subparser.set_defaults(func=self.do_compact)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to compact')
|
|
|
subparser.add_argument('--cleanup-commits', dest='cleanup_commits', action='store_true',
|
|
|
help='cleanup commit-only 17-byte segment files')
|
|
|
subparser.add_argument('--threshold', metavar='PERCENT', dest='threshold',
|
|
@@ -3635,9 +3627,6 @@ class Archiver:
|
|
|
group.add_argument('-l', '--list', dest='list', action='store_true',
|
|
|
help='list the configuration of the repo')
|
|
|
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False, proto='file'),
|
|
|
- help='repository to configure')
|
|
|
subparser.add_argument('name', metavar='NAME', nargs='?',
|
|
|
help='name of config key')
|
|
|
subparser.add_argument('value', metavar='VALUE', nargs='?',
|
|
@@ -3921,9 +3910,7 @@ class Archiver:
|
|
|
help='select compression algorithm, see the output of the '
|
|
|
'"borg help compression" command for details.')
|
|
|
|
|
|
- subparser.add_argument('location', metavar='ARCHIVE',
|
|
|
- type=location_validator(archive=True),
|
|
|
- help='name of archive to create (must be also a valid directory name)')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('paths', metavar='PATH', nargs='*', type=str,
|
|
|
help='paths to archive')
|
|
|
|
|
@@ -3966,9 +3953,7 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='dump archive items (metadata) (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_dump_archive_items)
|
|
|
- subparser.add_argument('location', metavar='ARCHIVE',
|
|
|
- type=location_validator(archive=True),
|
|
|
- help='archive to dump')
|
|
|
+ # archive name
|
|
|
|
|
|
debug_dump_archive_epilog = process_epilog("""
|
|
|
This command dumps all metadata of an archive in a decoded form to a file.
|
|
@@ -3979,9 +3964,7 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='dump decoded archive metadata (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_dump_archive)
|
|
|
- subparser.add_argument('location', metavar='ARCHIVE',
|
|
|
- type=location_validator(archive=True),
|
|
|
- help='archive to dump')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('path', metavar='PATH', type=str,
|
|
|
help='file to dump data into')
|
|
|
|
|
@@ -3994,9 +3977,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='dump decoded repository metadata (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_dump_manifest)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to dump')
|
|
|
subparser.add_argument('path', metavar='PATH', type=str,
|
|
|
help='file to dump data into')
|
|
|
|
|
@@ -4009,9 +3989,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='dump repo objects (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_dump_repo_objs)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to dump')
|
|
|
subparser.add_argument('--ghost', dest='ghost', action='store_true',
|
|
|
help='dump all segment file contents, including deleted/uncommitted objects and commits.')
|
|
|
|
|
@@ -4024,9 +4001,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='search repo objects (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_search_repo_objs)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to search')
|
|
|
subparser.add_argument('wanted', metavar='WANTED', type=str,
|
|
|
help='term to search the repo for, either 0x1234abcd hex term or a string')
|
|
|
|
|
@@ -4039,9 +4013,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='get object from repository (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_get_obj)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to use')
|
|
|
subparser.add_argument('id', metavar='ID', type=str,
|
|
|
help='hex object ID to get from the repo')
|
|
|
subparser.add_argument('path', metavar='PATH', type=str,
|
|
@@ -4056,9 +4027,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='put object to repository (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_put_obj)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to use')
|
|
|
subparser.add_argument('paths', metavar='PATH', nargs='+', type=str,
|
|
|
help='file(s) to read and create object(s) from')
|
|
|
|
|
@@ -4071,9 +4039,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='delete object from repository (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_delete_obj)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to use')
|
|
|
subparser.add_argument('ids', metavar='IDs', nargs='+', type=str,
|
|
|
help='hex object ID(s) to delete from the repo')
|
|
|
|
|
@@ -4086,9 +4051,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='show refcount for object from repository (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_refcount_obj)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to use')
|
|
|
subparser.add_argument('ids', metavar='IDs', nargs='+', type=str,
|
|
|
help='hex object ID(s) to show refcounts for')
|
|
|
|
|
@@ -4101,9 +4063,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='dump repo hints (debug)')
|
|
|
subparser.set_defaults(func=self.do_debug_dump_hints)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to dump')
|
|
|
subparser.add_argument('path', metavar='PATH', type=str,
|
|
|
help='file to dump data into')
|
|
|
|
|
@@ -4171,9 +4130,7 @@ class Archiver:
|
|
|
help='keep the local security info when deleting a repository')
|
|
|
subparser.add_argument('--save-space', dest='save_space', action='store_true',
|
|
|
help='work slower, but using less space')
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default='',
|
|
|
- type=location_validator(),
|
|
|
- help='repository or archive to delete')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('archives', metavar='ARCHIVE', nargs='*',
|
|
|
help='archives to delete')
|
|
|
define_archive_filters_group(subparser)
|
|
@@ -4210,9 +4167,9 @@ class Archiver:
|
|
|
subparser.add_argument('other_location', metavar='SRC_REPOSITORY',
|
|
|
type=location_validator(archive=False, other=True),
|
|
|
help='source repository')
|
|
|
- subparser.add_argument('location', metavar='DST_REPOSITORY',
|
|
|
- type=location_validator(archive=False, other=False),
|
|
|
- help='destination repository')
|
|
|
+ # subparser.add_argument('-r', '--repo', dest='location', metavar='DST_REPOSITORY',
|
|
|
+ # type=location_validator(archive=False, other=False),
|
|
|
+ # help='destination repository')
|
|
|
define_archive_filters_group(subparser)
|
|
|
|
|
|
# borg diff
|
|
@@ -4250,12 +4207,12 @@ class Archiver:
|
|
|
help='Sort the output lines by file path.')
|
|
|
subparser.add_argument('--json-lines', action='store_true',
|
|
|
help='Format output as JSON Lines. ')
|
|
|
- subparser.add_argument('location', metavar='REPO::ARCHIVE1',
|
|
|
- type=location_validator(archive=True),
|
|
|
- help='repository location and ARCHIVE1 name')
|
|
|
+ subparser.add_argument('archive1', metavar='ARCHIVE1',
|
|
|
+ type=archivename_validator(),
|
|
|
+ help='ARCHIVE1 name')
|
|
|
subparser.add_argument('archive2', metavar='ARCHIVE2',
|
|
|
type=archivename_validator(),
|
|
|
- help='ARCHIVE2 name (no repository location allowed)')
|
|
|
+ help='ARCHIVE2 name')
|
|
|
subparser.add_argument('paths', metavar='PATH', nargs='*', type=str,
|
|
|
help='paths of items inside the archives to compare; patterns are supported')
|
|
|
define_exclusion_group(subparser)
|
|
@@ -4317,9 +4274,7 @@ class Archiver:
|
|
|
subparser.add_argument('--tar-format', metavar='FMT', dest='tar_format', default='GNU',
|
|
|
choices=('BORG', 'PAX', 'GNU'),
|
|
|
help='select tar format: BORG, PAX or GNU')
|
|
|
- subparser.add_argument('location', metavar='ARCHIVE',
|
|
|
- type=location_validator(archive=True),
|
|
|
- help='archive to export')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('tarfile', metavar='FILE',
|
|
|
help='output tar file. "-" to write to stdout instead.')
|
|
|
subparser.add_argument('paths', metavar='PATH', nargs='*', type=str,
|
|
@@ -4377,9 +4332,7 @@ class Archiver:
|
|
|
help='write all extracted data to stdout')
|
|
|
subparser.add_argument('--sparse', dest='sparse', action='store_true',
|
|
|
help='create holes in output sparse file from all-zero chunks')
|
|
|
- subparser.add_argument('location', metavar='ARCHIVE',
|
|
|
- type=location_validator(archive=True),
|
|
|
- help='archive to extract')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('paths', metavar='PATH', nargs='*', type=str,
|
|
|
help='paths to extract; patterns are supported')
|
|
|
define_exclusion_group(subparser, strip_components=True)
|
|
@@ -4417,9 +4370,7 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='show repository or archive information')
|
|
|
subparser.set_defaults(func=self.do_info)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default='',
|
|
|
- type=location_validator(),
|
|
|
- help='repository or archive to display information about')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('--json', action='store_true',
|
|
|
help='format output as JSON')
|
|
|
define_archive_filters_group(subparser)
|
|
@@ -4553,9 +4504,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='initialize empty repository')
|
|
|
subparser.set_defaults(func=self.do_init)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to create')
|
|
|
subparser.add_argument('--other-location', metavar='OTHER_REPOSITORY', dest='other_location',
|
|
|
type=location_validator(archive=False, other=True),
|
|
|
help='reuse the key material from the other repository')
|
|
@@ -4626,8 +4574,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='export repository key for backup')
|
|
|
subparser.set_defaults(func=self.do_key_export)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False))
|
|
|
subparser.add_argument('path', metavar='PATH', nargs='?', type=str,
|
|
|
help='where to store the backup')
|
|
|
subparser.add_argument('--paper', dest='paper', action='store_true',
|
|
@@ -4657,8 +4603,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='import repository key from backup')
|
|
|
subparser.set_defaults(func=self.do_key_import)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False))
|
|
|
subparser.add_argument('path', metavar='PATH', nargs='?', type=str,
|
|
|
help='path to the backup (\'-\' to read from stdin)')
|
|
|
subparser.add_argument('--paper', dest='paper', action='store_true',
|
|
@@ -4679,8 +4623,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='change repository passphrase')
|
|
|
subparser.set_defaults(func=self.do_change_passphrase)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False))
|
|
|
|
|
|
change_location_epilog = process_epilog("""
|
|
|
Change the location of a borg key. The key can be stored at different locations:
|
|
@@ -4697,8 +4639,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='change key location')
|
|
|
subparser.set_defaults(func=self.do_change_location)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False))
|
|
|
subparser.add_argument('key_mode', metavar='KEY_LOCATION', choices=('repokey', 'keyfile'),
|
|
|
help='select key location')
|
|
|
subparser.add_argument('--keep', dest='keep', action='store_true',
|
|
@@ -4741,8 +4681,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='change key algorithm')
|
|
|
subparser.set_defaults(func=self.do_change_algorithm)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False))
|
|
|
subparser.add_argument('algorithm', metavar='ALGORITHM', choices=list(KEY_ALGORITHMS),
|
|
|
help='select key algorithm')
|
|
|
|
|
@@ -4821,9 +4759,7 @@ class Archiver:
|
|
|
'but keys used in it are added to the JSON output. '
|
|
|
'Some keys are always present. Note: JSON can only represent text. '
|
|
|
'A "bpath" key is therefore not available.')
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default='',
|
|
|
- type=location_validator(),
|
|
|
- help='repository or archive to list contents of')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('paths', metavar='PATH', nargs='*', type=str,
|
|
|
help='paths to list; patterns are supported')
|
|
|
define_archive_filters_group(subparser)
|
|
@@ -4926,9 +4862,6 @@ class Archiver:
|
|
|
define_archive_filters_group(subparser, sort_by=False, first_last=False)
|
|
|
subparser.add_argument('--save-space', dest='save_space', action='store_true',
|
|
|
help='work slower, but using less space')
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to prune')
|
|
|
|
|
|
# borg recreate
|
|
|
recreate_epilog = process_epilog("""
|
|
@@ -5036,9 +4969,7 @@ class Archiver:
|
|
|
'HASH_MASK_BITS, HASH_WINDOW_SIZE) or `default` to use the current defaults. '
|
|
|
'default: %s,%d,%d,%d,%d' % CHUNKER_PARAMS)
|
|
|
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default='',
|
|
|
- type=location_validator(),
|
|
|
- help='repository or archive to recreate')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('paths', metavar='PATH', nargs='*', type=str,
|
|
|
help='paths to recreate; patterns are supported')
|
|
|
|
|
@@ -5054,12 +4985,12 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='rename archive')
|
|
|
subparser.set_defaults(func=self.do_rename)
|
|
|
- subparser.add_argument('location', metavar='ARCHIVE',
|
|
|
- type=location_validator(archive=True),
|
|
|
- help='archive to rename')
|
|
|
+ subparser.add_argument('name_current', metavar='OLDNAME',
|
|
|
+ type=archivename_validator(),
|
|
|
+ help='the current archive name')
|
|
|
subparser.add_argument('name', metavar='NEWNAME',
|
|
|
type=archivename_validator(),
|
|
|
- help='the new archive name to use')
|
|
|
+ help='the new archive name')
|
|
|
|
|
|
# borg serve
|
|
|
serve_epilog = process_epilog("""
|
|
@@ -5176,9 +5107,6 @@ class Archiver:
|
|
|
help='Enable manifest authentication (in key and cache) (Borg 1.0.9 and later).')
|
|
|
subparser.add_argument('--disable-tam', dest='disable_tam', action='store_true',
|
|
|
help='Disable manifest authentication (in key and cache).')
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='path to the repository to be upgraded')
|
|
|
|
|
|
# borg with-lock
|
|
|
with_lock_epilog = process_epilog("""
|
|
@@ -5202,9 +5130,6 @@ class Archiver:
|
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
|
help='run user command with lock held')
|
|
|
subparser.set_defaults(func=self.do_with_lock)
|
|
|
- subparser.add_argument('location', metavar='REPOSITORY',
|
|
|
- type=location_validator(archive=False),
|
|
|
- help='repository to lock')
|
|
|
subparser.add_argument('command', metavar='COMMAND',
|
|
|
help='command to run')
|
|
|
subparser.add_argument('args', metavar='ARGS', nargs=argparse.REMAINDER,
|
|
@@ -5286,9 +5211,7 @@ class Archiver:
|
|
|
help='select compression algorithm, see the output of the '
|
|
|
'"borg help compression" command for details.')
|
|
|
|
|
|
- subparser.add_argument('location', metavar='ARCHIVE',
|
|
|
- type=location_validator(archive=True),
|
|
|
- help='name of archive to create (must be also a valid directory name)')
|
|
|
+ # archive name
|
|
|
subparser.add_argument('tarfile', metavar='TARFILE',
|
|
|
help='input tar file. "-" to read from stdin instead.')
|
|
|
return parser
|