init.rst.inc 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. `Common options`_
  14. |
  15. Description
  16. ~~~~~~~~~~~
  17. This command initializes an empty repository. A repository is a filesystem
  18. directory containing the deduplicated data from zero or more archives.
  19. Encryption can be enabled at repository init time (the default).
  20. It is not recommended to disable encryption. Repository encryption protects you
  21. e.g. against the case that an attacker has access to your backup repository.
  22. But be careful with the key / the passphrase:
  23. If you want "passphrase-only" security, use the repokey mode. The key will
  24. be stored inside the repository (in its "config" file). In above mentioned
  25. attack scenario, the attacker will have the key (but not the passphrase).
  26. If you want "passphrase and having-the-key" security, use the keyfile mode.
  27. The key will be stored in your home directory (in .config/borg/keys). In
  28. the attack scenario, the attacker who has just access to your repo won't have
  29. the key (and also not the passphrase).
  30. Make a backup copy of the key file (keyfile mode) or repo config file
  31. (repokey mode) and keep it at a safe place, so you still have the key in
  32. case it gets corrupted or lost. Also keep the passphrase at a safe place.
  33. The backup that is encrypted with that key won't help you with that, of course.
  34. Make sure you use a good passphrase. Not too short, not too simple. The real
  35. encryption / decryption key is encrypted with / locked by your passphrase.
  36. If an attacker gets your key, he can't unlock and use it without knowing the
  37. passphrase.
  38. Be careful with special or non-ascii characters in your passphrase:
  39. - Borg processes the passphrase as unicode (and encodes it as utf-8),
  40. so it does not have problems dealing with even the strangest characters.
  41. - BUT: that does not necessarily apply to your OS / VM / keyboard configuration.
  42. So better use a long passphrase made from simple ascii chars than one that
  43. includes non-ascii stuff or characters that are hard/impossible to enter on
  44. a different keyboard layout.
  45. You can change your passphrase for existing repos at any time, it won't affect
  46. the encryption/decryption key or other secrets.
  47. When encrypting, AES-CTR-256 is used for encryption, and HMAC-SHA256 for
  48. authentication. Hardware acceleration will be used automatically.