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