From 023a5a9edbe5214dc071778d73dfc8187c72d6a1 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 10 Jul 2021 22:53:04 +0200 Subject: [PATCH] docs: clarify "you will need key and passphrase" borg init warning, fixes #4622 there was a similar phrasing already, but this commit gets messages in sync with borg 1.1 again. --- src/borg/archiver.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index ec181e3c8..393fe7b83 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -295,19 +295,12 @@ class Archiver: 'for details about the security implications.', shlex.quote(path)) if key.NAME != 'plaintext': - if 'repokey' in key.NAME: - logger.warning( - '\n' - 'IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!\n' - 'The key is included in the repository config, but should be backed up in case the repository gets corrupted.\n' - 'Use "borg key export" to export the key, optionally in printable format.\n' - 'Write down the passphrase. Store both at safe place(s).\n') - else: - logger.warning( - '\n' - 'IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!\n' - 'Use "borg key export" to export the key, optionally in printable format.\n' - 'Write down the passphrase. Store both at safe place(s).\n') + logger.warning( + '\n' + 'IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!\n' + 'If you used a repokey mode, the key is stored in the repo, but you should back it up separately.\n' + 'Use "borg key export" to export the key, optionally in printable format.\n' + 'Write down the passphrase. Store both at safe place(s).\n') return self.exit_code @with_repository(exclusive=True, manifest=False)