key export --paper: fix restore hint for borg 2 syntax, fixes #10428

In borg 2, the positional argument of borg key import is the key backup
path, not the repository. Like most of the docs, assume BORG_REPO is set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Thomas Waldmann
2026-09-25 21:34:36 +02:00
co-authored by Claude Opus 5.5
parent 73e2284a67
commit 10394b0efd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ class KeyManager:
i += 1
return ret
export = "To restore key use borg key import --paper /path/to/repo\n\n"
export = "To restore key use borg key import --paper\n\n"
binary = binascii.a2b_base64(self.keyblob)
export += "BORG PAPER KEY v1\n"
+1 -1
View File
@@ -319,7 +319,7 @@ def test_key_export_paperkey(archivers, request):
assert (
export_contents
== """To restore key use borg key import --paper /path/to/repo
== """To restore key use borg key import --paper
BORG PAPER KEY v1
id: 2 / e29442 3506da 4e1ea7 / 25f62a 5a3d41 - 02