borgbackup/docs/usage/key_export.rst.inc

98 lines
5.1 KiB
PHP
Raw Normal View History

2016-10-01 12:23:36 -04:00
.. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
.. _borg_key_export:
borg key export
---------------
.. code-block:: none
2016-10-01 12:23:36 -04:00
2017-07-23 11:12:01 -04:00
borg [common options] key export [options] [REPOSITORY] [PATH]
2016-10-01 12:23:36 -04:00
2017-06-20 09:22:24 -04:00
.. only:: html
2017-06-20 05:49:26 -04:00
2017-06-20 09:22:24 -04:00
.. class:: borg-options-table
2016-10-01 12:23:36 -04:00
2017-06-20 09:22:24 -04:00
+-------------------------------------------------------+----------------+------------------------------------------------------------------------+
| **positional arguments** |
+-------------------------------------------------------+----------------+------------------------------------------------------------------------+
| | ``REPOSITORY`` | |
+-------------------------------------------------------+----------------+------------------------------------------------------------------------+
| | ``PATH`` | where to store the backup |
+-------------------------------------------------------+----------------+------------------------------------------------------------------------+
2025-04-18 12:26:48 -04:00
| **options** |
2017-06-20 09:22:24 -04:00
+-------------------------------------------------------+----------------+------------------------------------------------------------------------+
| | ``--paper`` | Create an export suitable for printing and later type-in |
+-------------------------------------------------------+----------------+------------------------------------------------------------------------+
| | ``--qr-html`` | Create an html file suitable for printing and later type-in or qr scan |
+-------------------------------------------------------+----------------+------------------------------------------------------------------------+
| .. class:: borg-common-opt-ref |
| |
| :ref:`common_options` |
+-------------------------------------------------------+----------------+------------------------------------------------------------------------+
2016-10-01 12:23:36 -04:00
2017-06-20 09:22:24 -04:00
.. raw:: html
2017-06-20 05:49:26 -04:00
2017-06-20 09:22:24 -04:00
<script type='text/javascript'>
$(document).ready(function () {
2017-06-20 09:22:24 -04:00
$('.borg-options-table colgroup').remove();
})
</script>
2016-10-01 12:23:36 -04:00
2017-06-20 09:22:24 -04:00
.. only:: latex
2017-06-20 09:22:24 -04:00
REPOSITORY
2017-06-20 09:22:24 -04:00
PATH
where to store the backup
2025-04-18 12:26:48 -04:00
options
2017-06-20 09:22:24 -04:00
--paper Create an export suitable for printing and later type-in
--qr-html Create an html file suitable for printing and later type-in or qr scan
:ref:`common_options`
|
2016-10-01 12:23:36 -04:00
Description
~~~~~~~~~~~
2026-03-18 18:55:22 -04:00
This command backs up the borg key.
2016-10-01 12:23:36 -04:00
If repository encryption is used, the repository is inaccessible
2026-03-18 18:55:22 -04:00
without the borg key (and the passphrase that protects the borg key).
If a repository is not encrypted, but authenticated, the borg key is
still needed to access the repository normally.
For repositories using **keyfile** encryption the key is kept locally
on the system that is capable of doing backups. To guard against loss
or corruption of this key, the key needs to be backed up independently
of the main data backup.
For repositories using **repokey** encryption or **authenticated** mode
the key is kept in the repository. A backup is thus not strictly needed,
but guards against the repository becoming inaccessible if the key is
corrupted or lost.
Note that the backup produced does not include the passphrase itself
2026-03-18 18:55:22 -04:00
(i.e. the exported key stays encrypted). In order to regain access to a
repository, one needs both the exported key and the original passphrase.
2026-03-18 18:55:22 -04:00
Keep the exported key and the passphrase at safe places.
2016-10-01 12:23:36 -04:00
There are three backup formats. The normal backup format is suitable for
2016-10-01 12:23:36 -04:00
digital storage as a file. The ``--paper`` backup format is optimized
2026-03-18 18:55:22 -04:00
for printing and typing in while importing, with per line checks to
reduce problems with manual input. The ``--qr-html`` creates a printable
HTML template with a QR code and a copy of the ``--paper``-formatted key.
2016-10-01 12:23:36 -04:00
2022-02-05 11:22:33 -05:00
Examples::
borg key export /path/to/repo > encrypted-key-backup
borg key export --paper /path/to/repo > encrypted-key-backup.txt
borg key export --qr-html /path/to/repo > encrypted-key-backup.html
# Or pass the output file as an argument instead of redirecting stdout:
borg key export /path/to/repo encrypted-key-backup
borg key export --paper /path/to/repo encrypted-key-backup.txt
borg key export --qr-html /path/to/repo encrypted-key-backup.html