Browse Source

Doc: borg key export: add examples (#6227)

docs: borg key export: add examples

see: https://github.com/borgbackup/borg/issues/6204#issuecomment-1027150308
Andrey Bienkowski 3 years ago
parent
commit
9f311abd79
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/borg/archiver.py

+ 12 - 0
src/borg/archiver.py

@@ -4131,6 +4131,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__,