1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-22 06:01:54 +00:00

Merge pull request #5907 from ThomasWaldmann/docs-key-hint-master

docs: clarify "you will need key and passphrase" borg init warning, fixes #4622
This commit is contained in:
TW 2021-07-10 23:55:51 +02:00 committed by GitHub
commit 7f97b0db99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -295,19 +295,12 @@ def do_init(self, args, repository):
'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)