1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-01 12:09:10 +00:00
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
borgfs.rst
borgfs.rst.inc
break-lock.rst.inc
change-passphrase.rst.inc
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.rst.inc build_usage 2020-04-12 19:51:49 +02:00
config.rst
config.rst.inc
create.rst
create.rst.inc build_usage 2020-04-12 19:51:49 +02:00
debug.rst
delete.rst
delete.rst.inc build_usage 2020-04-12 19:51:49 +02:00
diff.rst
diff.rst.inc
export-tar.rst.inc
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
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
key_export.rst.inc
key_import.rst.inc
key_migrate-to-repokey.rst.inc
list.rst
list.rst.inc build_usage 2020-04-12 19:51:49 +02:00
lock.rst
mount.rst
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
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