borg/docs/usage
Matthew Glazar 5a32de918e allow key-import+BORG_KEY_FILE to create key files
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.
2020-06-04 19:29:15 -07:00
..
general Improve description of path variables 2020-04-01 18:54:45 +02:00
benchmark.rst
benchmark_crud.rst.inc build_usage 2019-09-07 00:27:17 +02:00
borgfs.rst [DOCS] #4587 – Make Sphinx warnings break docs build 2020-03-16 19:06:00 +01:00
borgfs.rst.inc build_usage (master) 2017-11-25 14:35:52 +01:00
break-lock.rst.inc python setup.py build_usage 2017-07-23 17:12:01 +02:00
change-passphrase.rst.inc build_usage (master) 2017-11-25 14:35:52 +01:00
check.rst
check.rst.inc build_usage 2020-04-12 19:51:49 +02:00
common-options.rst.inc build_usage 2020-04-12 19:51:49 +02:00
compact.rst compact: move --cleanup-commits description from examples to docs 2019-05-06 23:10:07 +02:00
compact.rst.inc build_usage 2020-04-12 19:51:49 +02:00
config.rst Add borg config command (fixes #3304) 2017-11-23 14:51:54 -08:00
config.rst.inc build_usage 2019-09-07 00:27:17 +02:00
create.rst add a push-style example to borg-create(1) (#4613) 2019-08-09 22:46:57 +02:00
create.rst.inc build_usage 2020-04-12 19:51:49 +02:00
debug.rst
delete.rst update docs about separated compaction 2018-07-14 14:53:23 +02:00
delete.rst.inc build_usage 2020-04-12 19:51:49 +02:00
diff.rst
diff.rst.inc build_usage 2019-02-24 20:39:42 +01:00
export-tar.rst.inc python setup.py build_usage 2017-07-23 17:12:01 +02:00
extract.rst
extract.rst.inc build_usage 2020-04-12 19:51:49 +02:00
general.rst Merge pull request #5048 from finefoot/patch-8 2020-04-11 22:18:37 +02:00
help.rst
help.rst.inc build_usage 2020-04-21 22:56:55 +02:00
info.rst
info.rst.inc build_usage 2019-09-07 00:27:17 +02:00
init.rst docs: clarify borg init's encryption modes 2020-04-16 21:35:33 +02:00
init.rst.inc build_usage 2020-04-21 22:56:55 +02:00
key.rst allow key-import+BORG_KEY_FILE to create key files 2020-06-04 19:29:15 -07:00
key_change-passphrase.rst.inc build_usage (master) 2017-11-25 14:35:52 +01:00
key_export.rst.inc fix typo: allows to -> allows one to 2018-01-03 11:42:38 +01:00
key_import.rst.inc build_usage 2019-02-24 20:39:42 +01:00
key_migrate-to-repokey.rst.inc python setup.py build_usage 2017-07-23 17:12:01 +02:00
list.rst use --format rather than --list-format in examples, the latter is 2017-10-09 14:09:43 +02:00
list.rst.inc build_usage 2020-04-12 19:51:49 +02:00
lock.rst
mount.rst docs: give examples for borg mount exclusion options 2017-11-25 20:18:59 +01:00
mount.rst.inc build_usage 2020-04-12 19:51:49 +02:00
notes.rst [FEATURE] #4489 – Deprecate --nobsdflags option 2020-03-25 06:35:15 +01:00
prune.rst update docs about separated compaction 2018-07-14 14:53:23 +02:00
prune.rst.inc update man pages / usage docs 2018-07-14 14:56:29 +02:00
recreate.rst
recreate.rst.inc build_usage 2019-09-07 00:27:17 +02:00
rename.rst
rename.rst.inc
serve.rst remove superfluous whitespace in docs 2019-06-09 14:45:18 +02:00
serve.rst.inc build_usage 2019-02-24 20:39:42 +01:00
tar.rst docs: fix examples with problematic option placements, fixes #3356 2017-11-25 19:29:34 +01:00
umount.rst.inc
upgrade.rst
upgrade.rst.inc build_usage 2019-09-07 00:27:17 +02:00
usage_general.rst.inc [DOCS] #4587 – Make Sphinx warnings break docs build 2020-03-16 19:22:59 +01:00
with-lock.rst.inc build_usage 2019-02-24 20:39:42 +01:00