2
0
Эх сурвалжийг харах

key export: move examples to docs

Thomas Waldmann 1 жил өмнө
parent
commit
6211a3dc79

+ 12 - 0
docs/usage/key.rst

@@ -45,4 +45,16 @@ Fully automated using environment variables:
 
 .. include:: key_export.rst.inc
 
+Examples
+~~~~~~~~
+::
+
+    borg key export > encrypted-key-backup
+    borg key export --paper > encrypted-key-backup.txt
+    borg key export --qr-html > encrypted-key-backup.html
+    # Or pass the output file as an argument instead of redirecting stdout:
+    borg key export encrypted-key-backup
+    borg key export --paper encrypted-key-backup.txt
+    borg key export --qr-html encrypted-key-backup.html
+
 .. include:: key_import.rst.inc

+ 0 - 12
src/borg/archiver/key_cmds.py

@@ -160,18 +160,6 @@ class KeysMixIn:
         repository in the config file. A backup is thus not strictly needed,
         but guards against the repository becoming inaccessible if the file
         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(