mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-24 15:12:00 +00:00
borg dump-archive NAME / dump-archive-items NAME
This commit is contained in:
parent
75b53de37e
commit
1ed7e5b292
2 changed files with 4 additions and 4 deletions
|
@ -3952,7 +3952,7 @@ def define_borg_mount(parser):
|
|||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
help='dump archive items (metadata) (debug)')
|
||||
subparser.set_defaults(func=self.do_debug_dump_archive_items)
|
||||
subparser.add_argument('--name', dest='name', metavar='NAME', type=NameSpec,
|
||||
subparser.add_argument('name', metavar='NAME', type=NameSpec,
|
||||
help='specify the archive name')
|
||||
|
||||
debug_dump_archive_epilog = process_epilog("""
|
||||
|
@ -3964,7 +3964,7 @@ def define_borg_mount(parser):
|
|||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
help='dump decoded archive metadata (debug)')
|
||||
subparser.set_defaults(func=self.do_debug_dump_archive)
|
||||
subparser.add_argument('--name', dest='name', metavar='NAME', type=NameSpec,
|
||||
subparser.add_argument('name', metavar='NAME', type=NameSpec,
|
||||
help='specify the archive name')
|
||||
subparser.add_argument('path', metavar='PATH', type=str,
|
||||
help='file to dump data into')
|
||||
|
|
|
@ -2804,7 +2804,7 @@ def test_debug_dump_archive_items(self):
|
|||
self.cmd(f'--repo={self.repository_location}', 'init', '--encryption=repokey')
|
||||
self.cmd(f'--repo={self.repository_location}', 'create', 'test', 'input')
|
||||
with changedir('output'):
|
||||
output = self.cmd(f'--repo={self.repository_location}', 'debug', 'dump-archive-items', '--name=test')
|
||||
output = self.cmd(f'--repo={self.repository_location}', 'debug', 'dump-archive-items', 'test')
|
||||
output_dir = sorted(os.listdir('output'))
|
||||
assert len(output_dir) > 0 and output_dir[0].startswith('000000_')
|
||||
assert 'Done.' in output
|
||||
|
@ -3283,7 +3283,7 @@ def test_debug_dump_archive(self):
|
|||
self.cmd(f'--repo={self.repository_location}', 'init', '--encryption=repokey')
|
||||
self.cmd(f'--repo={self.repository_location}', 'create', 'test', 'input')
|
||||
dump_file = self.output_path + '/dump'
|
||||
output = self.cmd(f'--repo={self.repository_location}', 'debug', 'dump-archive', '--name=test', dump_file)
|
||||
output = self.cmd(f'--repo={self.repository_location}', 'debug', 'dump-archive', 'test', dump_file)
|
||||
assert output == ""
|
||||
with open(dump_file) as f:
|
||||
result = json.load(f)
|
||||
|
|
Loading…
Reference in a new issue