init.rst.inc 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_init:
  3. borg init
  4. ---------
  5. ::
  6. borg init <options> REPOSITORY
  7. positional arguments
  8. REPOSITORY
  9. repository to create
  10. optional arguments
  11. ``-e``, ``--encryption``
  12. | select encryption key mode (default: "repokey")
  13. ``-a``, ``--append-only``
  14. | create an append-only mode repository
  15. `Common options`_
  16. |
  17. Description
  18. ~~~~~~~~~~~
  19. This command initializes an empty repository. A repository is a filesystem
  20. directory containing the deduplicated data from zero or more archives.
  21. Encryption can be enabled at repository init time (the default).
  22. It is not recommended to disable encryption. Repository encryption protects you
  23. e.g. against the case that an attacker has access to your backup repository.
  24. But be careful with the key / the passphrase:
  25. If you want "passphrase-only" security, use the repokey mode. The key will
  26. be stored inside the repository (in its "config" file). In above mentioned
  27. attack scenario, the attacker will have the key (but not the passphrase).
  28. If you want "passphrase and having-the-key" security, use the keyfile mode.
  29. The key will be stored in your home directory (in .config/borg/keys). In
  30. the attack scenario, the attacker who has just access to your repo won't have
  31. the key (and also not the passphrase).
  32. Make a backup copy of the key file (keyfile mode) or repo config file
  33. (repokey mode) and keep it at a safe place, so you still have the key in
  34. case it gets corrupted or lost. Also keep the passphrase at a safe place.
  35. The backup that is encrypted with that key won't help you with that, of course.
  36. Make sure you use a good passphrase. Not too short, not too simple. The real
  37. encryption / decryption key is encrypted with / locked by your passphrase.
  38. If an attacker gets your key, he can't unlock and use it without knowing the
  39. passphrase.
  40. Be careful with special or non-ascii characters in your passphrase:
  41. - Borg processes the passphrase as unicode (and encodes it as utf-8),
  42. so it does not have problems dealing with even the strangest characters.
  43. - BUT: that does not necessarily apply to your OS / VM / keyboard configuration.
  44. So better use a long passphrase made from simple ascii chars than one that
  45. includes non-ascii stuff or characters that are hard/impossible to enter on
  46. a different keyboard layout.
  47. You can change your passphrase for existing repos at any time, it won't affect
  48. the encryption/decryption key or other secrets.
  49. Encryption modes
  50. ++++++++++++++++
  51. repokey and keyfile use AES-CTR-256 for encryption and HMAC-SHA256 for
  52. authentication in an encrypt-then-MAC (EtM) construction. The chunk ID hash
  53. is HMAC-SHA256 as well (with a separate key).
  54. repokey-blake2 and keyfile-blake2 use the same authenticated encryption, but
  55. use a keyed BLAKE2b-256 hash for the chunk ID hash.
  56. "authenticated" mode uses no encryption, but authenticates repository contents
  57. through the same keyed BLAKE2b-256 hash as the other blake2 modes.
  58. The key is stored like repokey.
  59. Hardware acceleration will be used automatically.