From 1dad7a39fd3300ca7c086b98c40b0ca710f1695c Mon Sep 17 00:00:00 2001 From: cornop <12619914+cornop@users.noreply.github.com> Date: Sat, 5 Jan 2019 14:46:24 +0100 Subject: [PATCH] Clarify the necessity to separately backup key in repokey mode (#4237) clarify the necessity to separately backup key in repokey mode --- src/borg/archiver.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 3042d6dfb..785a56117 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -258,11 +258,19 @@ class Archiver: 'for details about the security implications.', shlex.quote(path)) if key.NAME != 'plaintext': - 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') + 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') return self.exit_code @with_repository(exclusive=True, manifest=False)