Browse Source

Backport: Doc: borg key export: add examples

This is a backport of #6227
Andrey Bienkowski 3 years ago
parent
commit
77ab224294
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/borg/archiver.py

+ 12 - 0
src/borg/archiver.py

@@ -3223,6 +3223,18 @@ class Archiver:
         repository in the config file. A backup is thus not strictly needed,
         repository in the config file. A backup is thus not strictly needed,
         but guards against the repository becoming inaccessible if the file
         but guards against the repository becoming inaccessible if the file
         is damaged for some reason.
         is damaged for some reason.
+
+        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
+
+
         """)
         """)
         subparser = key_parsers.add_parser('export', parents=[common_parser], add_help=False,
         subparser = key_parsers.add_parser('export', parents=[common_parser], add_help=False,
                                           description=self.do_key_export.__doc__,
                                           description=self.do_key_export.__doc__,