From 2b7d65b0243567c66d80a616683684d892995102 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 21 May 2018 00:27:26 +0200 Subject: [PATCH] use repository.scan() for dump-repo-objs to get on-disk order it is also more efficient, avoids random access. --- src/borg/archiver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index d1a699f65..108b19476 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -1930,7 +1930,7 @@ def do_debug_dump_manifest(self, args, repository, manifest, key): @with_repository(manifest=False) def do_debug_dump_repo_objs(self, args, repository): - """dump (decrypted, decompressed) repo objects""" + """dump (decrypted, decompressed) repo objects, repo index MUST be current/correct""" from .crypto.key import key_factory # set up the key without depending on a manifest obj ids = repository.list(limit=1, marker=None) @@ -1940,7 +1940,7 @@ def do_debug_dump_repo_objs(self, args, repository): marker = None i = 0 while True: - result = repository.list(limit=LIST_SCAN_LIMIT, marker=marker) + result = repository.scan(limit=LIST_SCAN_LIMIT, marker=marker) # must use on-disk order scanning here if not result: break marker = result[-1]