From 0874bcbbf11258b9ff26d55dcf81c586e1ceb6a2 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 2 May 2018 00:53:56 +0200 Subject: [PATCH] debug dump-repo-objs should not depend on a manifest obj thus, we should not use the with_repository decorator to set up the key as it uses Manifest.load() to set up the key. if the Manifest is lost, that does not work. but we can use some arbitrary object to set up the key, so just do that. (cherry picked from commit 2e1f2e84d7fcc706f00168a4a49b22604597654c) --- src/borg/archiver.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 7279733ae..725dc92d5 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -1688,9 +1688,15 @@ class Archiver: json.dump(meta, fd, indent=4) return EXIT_SUCCESS - @with_repository(compatibility=Manifest.NO_OPERATION_CHECK) - def do_debug_dump_repo_objs(self, args, repository, manifest, key): + @with_repository(manifest=False) + def do_debug_dump_repo_objs(self, args, repository): """dump (decrypted, decompressed) repo objects""" + from .crypto.key import key_factory + # set up the key without depending on a manifest obj + ids = repository.list(limit=1, marker=None) + cdata = repository.get(ids[0]) + key = key_factory(repository, cdata) + marker = None i = 0 while True: