general.rst 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. General
  2. -------
  3. Borg consists of a number of commands. Each command accepts
  4. a number of arguments and options and interprets various environment variables.
  5. The following sections will describe each command in detail.
  6. Commands, options, parameters, paths and such are ``set in fixed-width``.
  7. Option values are `underlined`. Borg has few options accepting a fixed set
  8. of values (e.g. ``--encryption`` of :ref:`borg_rcreate`).
  9. .. container:: experimental
  10. Experimental features are marked with red stripes on the sides, like this paragraph.
  11. Experimental features are not stable, which means that they may be changed in incompatible
  12. ways or even removed entirely without prior notice in following releases.
  13. .. include:: usage_general.rst.inc
  14. In case you are interested in more details (like formulas), please see
  15. :ref:`internals`. For details on the available JSON output, refer to
  16. :ref:`json_output`.
  17. .. _common_options:
  18. Common options
  19. ~~~~~~~~~~~~~~
  20. All Borg commands share these options:
  21. .. include:: common-options.rst.inc
  22. Option ``--bypass-lock`` allows you to access the repository while bypassing
  23. borg's locking mechanism. This is necessary if your repository is on a read-only
  24. storage where you don't have write permissions or capabilities and therefore
  25. cannot create a lock. Examples are repositories stored on a Bluray disc or a
  26. read-only network storage. Avoid this option if you are able to use locks as
  27. that is the safer way; see the warning below.
  28. .. warning::
  29. If you do use ``--bypass-lock``, you are responsible to ensure that no other
  30. borg instances have write access to the repository. Otherwise, you might
  31. experience errors and read broken data if changes to that repository are
  32. being made at the same time.
  33. Option ``--help`` when used as a command works as expected on subcommands (e.g., ``borg help compact``).
  34. But it does not work when the help command is being used on sub-sub-commands (e.g., ``borg help key export``).
  35. The workaround for this to use the help command as a flag (e.g., ``borg key export --help``).
  36. Examples
  37. ~~~~~~~~
  38. ::
  39. # Create an archive and log: borg version, files list, return code
  40. $ borg -r /path/to/repo create --show-version --list --show-rc my-files files