mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-01 12:09:10 +00:00
5a32de918e
Running 'borg key import' on a keyfile repository with the BORG_KEY_FILE environment variable set works correctly if the BORG_KEY_FILE file already exists. However, the command crashes if the BORG_KEY_FILE file does not exist: $ BORG_KEY_FILE=newborgkey borg key import /home/strager/borg-backups/straglum borgkey Local Exception Traceback (most recent call last): [snip] File "[snip]/borg/crypto/key.py", line 713, in sanity_check with open(filename, 'rb') as fd: FileNotFoundError: [Errno 2] No such file or directory: '[snip]/newborgkey' Platform: Linux straglum 5.0.0-25-generic #26~18.04.1-Ubuntu SMP Thu Aug 1 13:51:02 UTC 2019 x86_64 Linux: debian buster/sid Borg: 1.1.11 Python: CPython 3.7.7 msgpack: 0.5.6 PID: 15306 CWD: /home/strager/Projects/borg sys.argv: ['[snip]/borg', 'key', 'import', '/home/strager/borg-backups/straglum', 'borgkey'] SSH_ORIGINAL_COMMAND: None Make 'borg key import' not require the BORG_KEY_FILE file to already exist. This commit does not change the behavior of 'borg key import' without BORG_KEY_FILE. This commit also does not change the behavior of 'borg key import' on a repokey repository. |
||
---|---|---|
.. | ||
general | ||
benchmark.rst | ||
benchmark_crud.rst.inc | ||
borgfs.rst | ||
borgfs.rst.inc | ||
break-lock.rst.inc | ||
change-passphrase.rst.inc | ||
check.rst | ||
check.rst.inc | ||
common-options.rst.inc | ||
compact.rst | ||
compact.rst.inc | ||
config.rst | ||
config.rst.inc | ||
create.rst | ||
create.rst.inc | ||
debug.rst | ||
delete.rst | ||
delete.rst.inc | ||
diff.rst | ||
diff.rst.inc | ||
export-tar.rst.inc | ||
extract.rst | ||
extract.rst.inc | ||
general.rst | ||
help.rst | ||
help.rst.inc | ||
info.rst | ||
info.rst.inc | ||
init.rst | ||
init.rst.inc | ||
key.rst | ||
key_change-passphrase.rst.inc | ||
key_export.rst.inc | ||
key_import.rst.inc | ||
key_migrate-to-repokey.rst.inc | ||
list.rst | ||
list.rst.inc | ||
lock.rst | ||
mount.rst | ||
mount.rst.inc | ||
notes.rst | ||
prune.rst | ||
prune.rst.inc | ||
recreate.rst | ||
recreate.rst.inc | ||
rename.rst | ||
rename.rst.inc | ||
serve.rst | ||
serve.rst.inc | ||
tar.rst | ||
umount.rst.inc | ||
upgrade.rst | ||
upgrade.rst.inc | ||
usage_general.rst.inc | ||
with-lock.rst.inc |