Browse Source

Screencasts/advanced: fix the key export example

The previous example had an incorrect sequence of arguments
in the --qr-html case. I have also updated --paper
for consistency
Andrey Bienkowski 3 years ago
parent
commit
06a19dd87b
2 changed files with 210 additions and 195 deletions
  1. 208 193
      docs/misc/asciinema/advanced.json
  2. 2 2
      docs/misc/asciinema/advanced.tcl

+ 208 - 193
docs/misc/asciinema/advanced.json

@@ -1,193 +1,208 @@
-{"version": 2, "width": 80, "height": 24, "timestamp": 1645357971, "env": {"SHELL": "/bin/bash", "TERM": "vt100"}}
-[0.594837, "o", "spawn /bin/sh\r\r\r\n"]
-[0.598228, "o", "$ "]
-[0.598532, "o", "# For the pro users, here are some advanced features of borg, so you can impress your friends. ;)\r\r\n$ "]
-[0.598701, "o", "# Note: This screencast was made with borg 1.1.0b6 – older or newer borg versions may behave differently.\r\r\n"]
-[0.598897, "o", "$ "]
-[0.599121, "o", "\r\r\n$ "]
-[0.599316, "o", "# First of all, we can use several environment variables for borg.\r\r\n$ "]
-[0.599523, "o", "# E.g. we do not want to type in our repo path and password again and again…\r\r\n$ "]
-[0.599721, "o", "export BORG_REPO='/media/backup/borgdemo'\r\r\n$ "]
-[0.599931, "o", "export BORG_PASSPHRASE='1234'\r\r\n$ "]
-[0.600172, "o", "# Problem solved, borg will use this automatically… :)\r\r\n$ "]
-[0.600352, "o", "# We'll use this right away…\r\r\n$ "]
-[0.600553, "o", "\r\r\n$ "]
-[0.600724, "o", "## ADVANCED CREATION ##\r\r\n$ "]
-[0.600938, "o", "\r\r\n$ "]
-[0.601147, "o", "# We can also use some placeholders in our archive name…\r\r\n$ "]
-[0.601401, "o", "borg create --stats --progress --compression lz4 ::{user}-{now} Wallpaper\r\r\n"]
-[1.348708, "o", "0 B O 0 B C 0 B D 0 N Wallpaper                                                 \r"]
-[1.349493, "o", "Initializing cache transaction: Reading config                                  \r"]
-[1.350365, "o", "Initializing cache transaction: Reading chunks                                  \r"]
-[1.35106, "o", "Initializing cache transaction: Reading files                                   \r"]
-[1.351687, "o", "                                                                                \r"]
-[1.361549, "o", "Compacting segments   0%                                                        \r"]
-[1.362448, "o", "Compacting segments  50%                                                        \r"]
-[1.363211, "o", "                                                                                \r"]
-[1.368712, "o", "Saving chunks cache                                                             \r"]
-[1.369541, "o", "Saving cache config                                                             \r"]
-[1.372029, "o", "                                                                                \r"]
-[1.37255, "o", "                                                                                \r"]
-[1.373322, "o", "------------------------------------------------------------------------------\r\r\n"]
-[1.373789, "o", "Archive name: root-2022-02-20T11:52:52\r\r\nArchive fingerprint: e77b73f6d2e7a80e0d5fed84f5257e7b1b0d6a91bab7aceeed3df4e5d5a4af01\r\r\n"]
-[1.374231, "o", "Time (start): Sun, 2022-02-20 11:52:53\r\r\n"]
-[1.374886, "o", "Time (end):   Sun, 2022-02-20 11:52:53\r\r\n"]
-[1.375354, "o", "Duration: 0.01 seconds\r\r\n"]
-[1.375844, "o", "Number of files: 0\r\r\nUtilization of max. archive size: 0%\r\r\n"]
-[1.37647, "o", "------------------------------------------------------------------------------\r\r\n"]
-[1.376924, "o", "                       Original size      Compressed size    Deduplicated size\r\r\n"]
-[1.377332, "o", "This archive:                  567 B                609 B                609 B\r\r\n"]
-[1.377977, "o", "All archives:                  567 B                609 B                609 B\r\r\n"]
-[1.378425, "o", "\r\r\n"]
-[1.378926, "o", "                       Unique chunks         Total chunks\r\r\n"]
-[1.379376, "o", "Chunk index:                       2                    2\r\r\n"]
-[1.379911, "o", "------------------------------------------------------------------------------\r\r\n"]
-[1.445221, "o", "$ "]
-[1.445469, "o", "# Notice the backup name.\r\r\n$ \r\r\n$ "]
-[1.445933, "o", "# And we can put completely different data, with different backup settings, in our backup. It will be deduplicated, anyway:\r\r\n$ "]
-[1.446236, "o", "borg create --stats --progress --compression zlib,6 --exclude ~/Downloads/big ::{user}-{now} ~/Downloads\r\r\n"]
-[2.179266, "o", "0 B O 0 B C 0 B D 0 N root/Downloads                                            \r"]
-[2.180274, "o", "Initializing cache transaction: Reading config                                  \r"]
-[2.181033, "o", "Initializing cache transaction: Reading chunks                                  \r"]
-[2.182003, "o", "Initializing cache transaction: Reading files                                   \r"]
-[2.182796, "o", "                                                                                \r"]
-[2.192525, "o", "Compacting segments   0%                                                        \r"]
-[2.193469, "o", "Compacting segments  50%                                                        \r"]
-[2.193973, "o", "                                                                                \r"]
-[2.19988, "o", "Saving chunks cache                                                             \r"]
-[2.200768, "o", "Saving cache config                                                             \r"]
-[2.202936, "o", "                                                                                \r"]
-[2.203342, "o", "                                                                                \r"]
-[2.204177, "o", "------------------------------------------------------------------------------\r\r\n"]
-[2.204518, "o", "Archive name: root-2022-02-20T11:52:53\r\r\nArchive fingerprint: 75501a46eae40b846cd871953fc4a5fc703bcee7f27f2de6e569d5b0806ab233\r\r\n"]
-[2.204806, "o", "Time (start): Sun, 2022-02-20 11:52:53\r\r\n"]
-[2.205195, "o", "Time (end):   Sun, 2022-02-20 11:52:53\r\r\n"]
-[2.20563, "o", "Duration: 0.01 seconds\r\r\n"]
-[2.206014, "o", "Number of files: 0\r\r\n"]
-[2.206511, "o", "Utilization of max. archive size: 0%\r\r\n"]
-[2.207019, "o", "------------------------------------------------------------------------------\r\r\n"]
-[2.207448, "o", "                       Original size      Compressed size    Deduplicated size\r\r\n"]
-[2.207906, "o", "This archive:                  611 B                634 B                634 B"]
-[2.208321, "o", "\r\r\n"]
-[2.208698, "o", "All archives:                1.18 kB              1.24 kB              1.24 kB\r\r\n"]
-[2.210199, "o", "\r\r\n"]
-[2.210588, "o", "                       Unique chunks         Total chunks\r\r\n"]
-[2.211042, "o", "Chunk index:                       4                    4\r\r\n"]
-[2.211589, "o", "------------------------------------------------------------------------------\r\r\n"]
-[2.272589, "o", "$ "]
-[2.272918, "o", "\r\r\n"]
-[2.273124, "o", "$ "]
-[2.273443, "o", "# Or let's backup a device via STDIN.\r\r\n$ "]
-[2.274055, "o", "sudo dd if=/dev/loop0 bs=10M | borg create --progress --stats ::specialbackup -\r\r\n"]
-[3.524127, "o", "Initializing cache transaction: Reading config                                  \r"]
-[3.524762, "o", "Initializing cache transaction: Reading chunks                                  \r"]
-[3.525707, "o", "Initializing cache transaction: Reading files                                   \r"]
-[3.526534, "o", "                                                                                \r"]
-[3.537554, "o", "8.39 MB O 32.95 kB C 32.95 kB D 0 N stdin                                       \r"]
-[3.757047, "o", "33.55 MB O 131.80 kB C 32.95 kB D 0 N stdin                                     \r"]
-[3.967764, "o", "58.72 MB O 230.65 kB C 32.95 kB D 0 N stdin                                     \r"]
-[4.197647, "o", "83.89 MB O 329.50 kB C 32.95 kB D 0 N stdin                                     \r"]
-[4.402809, "o", "109.05 MB O 428.35 kB C 32.95 kB D 0 N stdin                                    \r"]
-[4.609824, "o", "134.22 MB O 527.20 kB C 32.95 kB D 0 N stdin                                    \r"]
-[4.828766, "o", "159.38 MB O 626.05 kB C 32.95 kB D 0 N stdin                                    \r"]
-[5.035256, "o", "184.55 MB O 724.90 kB C 32.95 kB D 0 N stdin                                    \r"]
-[5.252718, "o", "209.72 MB O 823.75 kB C 32.95 kB D 0 N stdin                                    \r"]
-[5.461472, "o", "234.88 MB O 922.60 kB C 32.95 kB D 0 N stdin                                    \r"]
-[5.665572, "o", "260.05 MB O 1.02 MB C 32.95 kB D 0 N stdin                                      \r"]
-[5.888179, "o", "285.21 MB O 1.12 MB C 32.95 kB D 0 N stdin                                      \r"]
-[6.15803, "o", "318.77 MB O 1.25 MB C 32.95 kB D 0 N stdin                                      \r"]
-[6.417346, "o", "352.32 MB O 1.38 MB C 32.95 kB D 0 N stdin                                      \r"]
-[6.633846, "o", "377.49 MB O 1.48 MB C 32.95 kB D 0 N stdin                                      \r"]
-[6.835129, "o", "402.65 MB O 1.58 MB C 32.95 kB D 0 N stdin                                      \r"]
-[6.969223, "o", "40+0 records in\r\r\n40+0 records out\r\r\n419430400 bytes (419 MB, 400 MiB) copied, 4.68425 s, 89.5 MB/s\r\r\n"]
-[6.977491, "o", "Compacting segments   0%                                                        \r"]
-[6.978724, "o", "Compacting segments  50%                                                        \r"]
-[6.979439, "o", "                                                                                \r"]
-[6.988871, "o", "Saving chunks cache                                                             \r"]
-[6.990014, "o", "Saving cache config                                                             \r"]
-[6.992529, "o", "                                                                                \r"]
-[6.993176, "o", "                                                                                \r"]
-[6.993991, "o", "------------------------------------------------------------------------------\r\r\n"]
-[6.994356, "o", "Archive name: specialbackup\r\r\n"]
-[6.995013, "o", "Archive fingerprint: 0d15b393c9f283f837ca4e5809c47844925be29768402597a4d6be849a89cc5e\r\r\nTime (start): Sun, 2022-02-20 11:52:55\r\r\nTime (end):   Sun, 2022-02-20 11:52:58\r\r\nDuration: 3.51 seconds\r\r\nNumber of files: 1"]
-[6.995455, "o", "\r\r\n"]
-[6.996171, "o", "Utilization of max. archive size: 0%\r\r\n"]
-[6.996451, "o", "------------------------------------------------------------------------------\r\r\n                       Original size      Compressed size    Deduplicated size\r\r\nThis archive:              419.43 MB              1.65 MB             33.60 kB\r\r\nAll archives:              419.43 MB              1.65 MB             34.84 kB\r\r\n"]
-[6.997204, "o", "\r\r\n                       Unique chunks         Total chunks\r\r\nChunk index:                       7                   56\r\r\n------------------------------------------------------------------------------\r\r\n"]
-[7.063082, "o", "$ "]
-[7.063411, "o", "\r\r\n"]
-[7.063654, "o", "$ "]
-[7.063968, "o", "# Let's continue with some simple things:\r\r\n$ "]
-[7.064294, "o", "## USEFUL COMMANDS ##\r\r\n$ "]
-[7.064595, "o", "# You can show some information about an archive. You can even do it without needing to specify the archive name:\r\r\n$ "]
-[7.065029, "o", "borg info :: --last 1\r\r\n"]
-[7.802353, "o", "Archive name: specialbackup\r\r\nArchive fingerprint: 0d15b393c9f283f837ca4e5809c47844925be29768402597a4d6be849a89cc5e\r\r\nComment: \r\r\nHostname: bullseye\r\r\nUsername: root\r\r\nTime (start): Sun, 2022-02-20 11:52:55\r\r\nTime (end): Sun, 2022-02-20 11:52:58\r\r\nDuration: 3.51 seconds\r\r\nNumber of files: 1\r\r\nCommand line: borg create --progress --stats ::specialbackup -\r\r\nUtilization of max. archive size: 0%\r\r\n------------------------------------------------------------------------------\r\r\n                       Original size      Compressed size    Deduplicated size\r\r\nThis archive:              419.43 MB              1.65 MB             33.60 kB\r\r\nAll archives:              419.43 MB              1.65 MB             34.84 kB\r\r\n\r\r\n                       Unique chunks         Total chunks\r\r\nChunk index:                       7                   56\r\r\n"]
-[7.871303, "o", "$ "]
-[7.872125, "o", "\r\r\n$ "]
-[7.872398, "o", "# So let's rename our last archive:\r\r\n$ "]
-[7.872589, "o", "borg rename ::specialbackup backup-block-device\r\r\n"]
-[8.68015, "o", "$ "]
-[8.680963, "o", "\r\r\n$ "]
-[8.681341, "o", "borg info :: --last 1\r\r\n"]
-[9.417953, "o", "Archive name: backup-block-device\r\r\nArchive fingerprint: 61083530f48f1d3a131d8d5314eb2b7db43f5e8791f209eb881782675b0fca1b\r\r\nComment: \r\r\nHostname: bullseye\r\r\nUsername: root\r\r\nTime (start): Sun, 2022-02-20 11:52:55\r\r\nTime (end): Sun, 2022-02-20 11:52:58\r\r\nDuration: 3.51 seconds\r\r\nNumber of files: 1\r\r\nCommand line: borg create --progress --stats ::specialbackup -\r\r\nUtilization of max. archive size: 0%\r\r\n------------------------------------------------------------------------------\r\r\n                       Original size      Compressed size    Deduplicated size\r\r\nThis archive:              419.43 MB              1.65 MB             33.62 kB\r\r\nAll archives:              419.43 MB              1.65 MB             34.86 kB\r\r\n\r\r\n                       Unique chunks         Total chunks\r\r\nChunk index:                       7                   56"]
-[9.418529, "o", "\r\r\n"]
-[9.482841, "o", "$ "]
-[9.483577, "o", "\r\r\n"]
-[9.483791, "o", "$ "]
-[9.484389, "o", "# A very important step if you choose keyfile mode (where the keyfile is only saved locally) is to export your keyfile and possibly print it, etc.\r\r\n$ borg key export :: --qr-html file.html  # this creates a nice HTML, but when you want something simpler…\r\r\n"]
-[10.011157, "o", "usage: borg [-V] [-h] [--critical] [--error] [--warning] [--info] [--debug]\r\r\n            [--debug-topic TOPIC] [-p] [--log-json] [--lock-wait N]\r\r\n            [--show-version] [--show-rc] [--no-files-cache] [--umask M]\r\r\n            [--remote-path PATH] [--remote-ratelimit rate]\r\r\n            [--consider-part-files] [--debug-profile FILE]\r\r\n            <command> ...\r\r\n"]
-[10.011826, "o", "borg: error: unrecognized arguments: file.html\r\r\n"]
-[10.073321, "o", "$ "]
-[10.074105, "o", "borg key export :: --paper  # this is a \"manual input\"-only backup (but it is also included in the --qr-code option)\r\r\n"]
-[10.715266, "o", "To restore key use borg key import --paper /path/to/repo\r\r\n\r\r\nBORG PAPER KEY v1\r\r\nid: 20 / 8fffb3 1062bd e1697e / 3d0f0c 900c2e - d6\r\r\n 1: 86a961 6c676f 726974 686da6 736861 323536 - 14\r\r\n 2: a46461 7461da 00dee5 449b5e 9ec1f3 e7adf2 - 85\r\r\n 3: 7d13d0 218444 a534e3 b7d593 e86c00 116f36 - f1\r\r\n 4: dbb47b 5da76c ff2df0 37c2c8 5e2b81 39e401 - b2\r\r\n 5: bcd4f4 0671ee eaf53e dafd32 62a9e7 1aa4b5 - 90\r\r\n 6: b81138 c0a627 af40c2 a7a036 849403 86d5fb - 46\r\r\n 7: 95f8bd 6585ca ccd218 b2d1bc 387164 54147d - e6\r\r\n 8: 341b60 8ec120 860eb3 12c1b8 9cd3b6 210077 - 8e\r\r\n 9: 414559 57300a 7bb9bf 6569bd bd52d6 152f00 - 82\r\r\n10: 39df9b 09b85e c4599d 7723de c10f63 938676 - b9\r\r\n11: 606adf a3b247 3f3860 fe1c89 804c91 5f9eb8 - aa\r\r\n12: 09534a b7f8dc a318cc 958dd0 8ce831 e41248 - d1\r\r\n13: 642bd3 76c3ad 987e4e 67b9ea 4ec774 4b261e - 8f\r\r\n14: 174698 8cd916 404890 e941be f03ca4 686173 - 08\r\r\n15: 68da00 202353 b557d4 5e7a59 49bbcd 78f1a7 - 80\r\r\n16: 8e5b93 38e44b 2701d0 74f3bf 19148e 85fa43 - ca\r\r\n17: aa6974 657261 74696f 6e73ce 000186 a0"]
-[10.715338, "o", "a473 - 15\r\r\n18: 616c74 da0020 220bd4 38ae78 78cb79 c8c334 - a0\r\r\n19: 8c76fd 593e36 887da7 57e656 b79e9e a7a107 - 7d\r\r\n20: cf2ea7 766572 73696f 6e01 - 7c\r\r\n\r\r\n"]
-[10.780597, "o", "$ "]
-[10.781268, "o", "\r\r\n$ "]
-[10.78159, "o", "## MAINTENANCE ##\r\r\n$ "]
-[10.782029, "o", "# Sometimes backups get broken or we want a regular \"checkup\" that everything is okay…\r\r\n$ "]
-[10.782414, "o", "borg check -v ::\r\r\n"]
-[11.638793, "o", "Starting repository check\r\r\n"]
-[11.642682, "o", "Starting repository index check\r\r\n"]
-[11.643158, "o", "Completed repository check, no problems found."]
-[11.644148, "o", "\r\r\nStarting archive consistency check...\r\r\n"]
-[11.746938, "o", "Analyzing archive root-2022-02-20T11:52:52 (1/3)\r\r\n"]
-[11.751698, "o", "Analyzing archive root-2022-02-20T11:52:53 (2/3)\r\r\n"]
-[11.752977, "o", "Analyzing archive backup-block-device (3/3)\r\r\n"]
-[11.754407, "o", "Archive consistency check complete, no problems found.\r\r\n"]
-[11.819239, "o", "$ "]
-[11.819588, "o", "\r\r\n$ "]
-[11.819983, "o", "# Next problem: Usually you do not have infinite disk space. So you may need to prune your archive…\r\r\n$ # You can tune this in every detail. See the docs for details. Here only a simple example:\r\r\n$ "]
-[11.820517, "o", "borg prune --list --keep-last 1 --dry-run\r\r\n"]
-[12.584917, "o", "Keeping archive: backup-block-device                  Sun, 2022-02-20 11:52:55 [61083530f48f1d3a131d8d5314eb2b7db43f5e8791f209eb881782675b0fca1b]\r\r\nWould prune:     root-2022-02-20T11:52:53             Sun, 2022-02-20 11:52:53 [75501a46eae40b846cd871953fc4a5fc703bcee7f27f2de6e569d5b0806ab233]"]
-[12.585156, "o", "\r\r\n"]
-[12.586134, "o", "Would prune:     root-2022-02-20T11:52:52             Sun, 2022-02-20 11:52:53 [e77b73f6d2e7a80e0d5fed84f5257e7b1b0d6a91bab7aceeed3df4e5d5a4af01]\r\r\n"]
-[12.651806, "o", "$ "]
-[12.652134, "o", "# When actually executing it in a script, you have to use it without the --dry-run option, of course.\r\r\n$ "]
-[12.652368, "o", "\r\r\n"]
-[12.65277, "o", "$ ## RESTORE ##\r\r\n$ "]
-[12.65353, "o", "\r\r\n$ "]
-[12.654836, "o", "# When you want to see the diff between two archives use this command.\r\r\n$ # E.g. what happened between the first two backups?\r\r\n"]
-[12.655555, "o", "$ borg diff ::backup1 backup2\r\r\n"]
-[13.397856, "o", "Archive backup1 does not exist\r\r\n"]
-[13.461457, "o", "$ "]
-[13.46206, "o", "# Ah, we added a file, right…\r\r\n"]
-[13.462395, "o", "$ "]
-[13.462789, "o", "\r\r\n$ # There are also other ways to extract the data.\r\r\n"]
-[13.463165, "o", "$ "]
-[13.46364, "o", "# E.g. as a tar archive.\r\r\n$ borg export-tar --progress ::backup2 backup.tar.gz\r\r\n"]
-[14.449917, "o", "Archive backup2 does not exist\r\r\n"]
-[14.514443, "o", "$ ls -l\r\r\n"]
-[14.516485, "o", "total 473960\r\r\ndrwxr-xr-x 2 root root      4096 Feb 20 11:23 Wallpaper\r\r\n-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64\r\r\n-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64.1\r\r\n-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64.2\r\r\n"]
-[14.51669, "o", "-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64.3\r\r\n-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64.4\r\r\n-rw-r--r-- 1 root root       819 Dec  7 21:44 borg-linux64.asc\r\r\n-rw-r--r-- 1 root root       819 Dec  7 21:44 borg-linux64.asc.1\r\r\n-rw-r--r-- 1 root root       819 Dec  7 21:44 borg-linux64.asc.2\r\r\n-rw-r--r-- 1 root root 419430400 Feb 20 11:52 loopbackfile.img\r\r\n-rw-r--r-- 1 root root         0 Feb 20 11:14 wget-log\r\r\n-rw-r--r-- 1 root root         0 Feb 20 11:40 wget-log.1\r\r\n"]
-[14.517489, "o", "$ "]
-[14.518125, "o", "\r\r\n$ # You can mount an archive or even the whole repository:\r\r\n"]
-[14.51858, "o", "$ mkdir /tmp/mount\r\r\n"]
-[14.520177, "o", "mkdir: cannot create directory ‘/tmp/mount’: File exists\r\r\n"]
-[14.520803, "o", "$ borg mount :: /tmp/mount\r\r\n"]
-[15.259609, "o", "$ ls -la /tmp/mount\r\r\n"]
-[15.264614, "o", "total 4\r\r\ndrwxr-xr-x  1 root root    0 Feb 20 11:53 .\r\r\ndrwxrwxrwt 11 root root 4096 Feb 20 11:53 ..\r\r\ndrwxr-xr-x  1 root root    0 Feb 20 11:53 backup-block-device\r\r\ndrwxr-xr-x  1 root root    0 Feb 20 11:53 root-2022-02-20T11:52:52\r\r\ndrwxr-xr-x  1 root root    0 Feb 20 11:53 root-2022-02-20T11:52:53\r\r\n"]
-[15.265374, "o", "$ borg umount /tmp/mount\r\r\n"]
-[16.046274, "o", "$ \r\r\n"]
-[16.047059, "o", "$ "]
-[16.047118, "o", "# That's it, but of course there is more to explore, so have a look at the docs.\r\r\n"]
-[16.047415, "o", "$ "]
+{"version": 2, "width": 80, "height": 24, "timestamp": 1645358574, "env": {"SHELL": "/bin/bash", "TERM": "vt100"}}
+[1.165215, "o", "spawn /bin/sh\r\r\r\n"]
+[1.169007, "o", "$ "]
+[1.169849, "o", "# For the pro users, here are some advanced features of borg, so you can impress your friends. ;)\r\r\n$ "]
+[1.17027, "o", "# Note: This screencast was made with borg 1.1.0b6 – older or newer borg versions may behave differently.\r\r\n$ "]
+[1.170543, "o", "\r\r\n"]
+[1.171172, "o", "$ "]
+[1.171463, "o", "# First of all, we can use several environment variables for borg.\r\r\n$ "]
+[1.171654, "o", "# E.g. we do not want to type in our repo path and password again and again…\r\r\n"]
+[1.172939, "o", "$ "]
+[1.173203, "o", "export BORG_REPO='/media/backup/borgdemo'\r\r\n"]
+[1.173762, "o", "$ "]
+[1.174064, "o", "export BORG_PASSPHRASE='1234'\r\r\n$ "]
+[1.174661, "o", "# Problem solved, borg will use this automatically… :)\r\r\n$ "]
+[1.175144, "o", "# We'll use this right away…\r\r\n$ "]
+[1.175546, "o", "\r\r\n$ "]
+[1.176032, "o", "## ADVANCED CREATION ##\r\r\n$ "]
+[1.176891, "o", "\r\r\n$ "]
+[1.177856, "o", "# We can also use some placeholders in our archive name…\r\r\n$ "]
+[1.178416, "o", "borg create --stats --progress --compression lz4 ::{user}-{now} Wallpaper\r\r\n"]
+[1.913913, "o", "0 B O 0 B C 0 B D 0 N Wallpaper                                                 \r"]
+[1.914896, "o", "Initializing cache transaction: Reading config                                  \r"]
+[1.915807, "o", "Initializing cache transaction: Reading chunks                                  \r"]
+[1.916707, "o", "Initializing cache transaction: Reading files                                   \r"]
+[1.917579, "o", "                                                                                \r"]
+[1.926877, "o", "Compacting segments   0%                                                        \r"]
+[1.928083, "o", "Compacting segments  50%                                                        \r"]
+[1.928154, "o", "                                                                                \r"]
+[1.945149, "o", "Saving chunks cache                                                             \rSaving cache config                                                             \r"]
+[1.962146, "o", "                                                                                \r"]
+[1.962729, "o", "                                                                                \r"]
+[1.966313, "o", "------------------------------------------------------------------------------"]
+[1.967887, "o", "\r\r\n"]
+[1.970472, "o", "Archive name: root-2022-02-20T12:02:56\r\r\n"]
+[1.971306, "o", "Archive fingerprint: 5d472474590d87bb0384a87d2e8ff807e8cc341dd5b0131c7e4bbfe07493439a\r\r\n"]
+[1.971773, "o", "Time (start): Sun, 2022-02-20 12:02:56\r\r\n"]
+[1.972345, "o", "Time (end):   Sun, 2022-02-20 12:02:56\r\r\n"]
+[1.972896, "o", "Duration: 0.01 seconds\r\r\n"]
+[1.973337, "o", "Number of files: 0\r\r\n"]
+[1.973963, "o", "Utilization of max. archive size: 0%\r\r\n"]
+[1.974458, "o", "------------------------------------------------------------------------------\r\r\n"]
+[1.975004, "o", "                       Original size      Compressed size    Deduplicated size\r\r\n"]
+[1.975465, "o", "This archive:                  567 B                609 B                609 B\r\r\n"]
+[1.976003, "o", "All archives:                  567 B                609 B                609 B\r\r\n"]
+[1.976521, "o", "\r\r\n"]
+[1.977064, "o", "                       Unique chunks         Total chunks\r\r\n"]
+[1.97764, "o", "Chunk index:                       2                    2\r\r\n"]
+[1.978166, "o", "------------------------------------------------------------------------------\r\r\n"]
+[2.045009, "o", "$ "]
+[2.045308, "o", "# Notice the backup name.\r\r\n"]
+[2.045755, "o", "$ "]
+[2.046286, "o", "\r\r\n$ "]
+[2.046596, "o", "# And we can put completely different data, with different backup settings, in our backup. It will be deduplicated, anyway:\r\r\n$ "]
+[2.046878, "o", "borg create --stats --progress --compression zlib,6 --exclude ~/Downloads/big ::{user}-{now} ~/Downloads\r\r\n"]
+[2.809167, "o", "0 B O 0 B C 0 B D 0 N root/Downloads                                            \r"]
+[2.810211, "o", "Initializing cache transaction: Reading config                                  \r"]
+[2.811059, "o", "Initializing cache transaction: Reading chunks                                  \r"]
+[2.811931, "o", "Initializing cache transaction: Reading files                                   \r"]
+[2.812731, "o", "                                                                                \r"]
+[2.822804, "o", "Compacting segments   0%                                                        \r"]
+[2.823852, "o", "Compacting segments  50%                                                        \r"]
+[2.824464, "o", "                                                                                \r"]
+[2.830558, "o", "Saving chunks cache                                                             \r"]
+[2.831684, "o", "Saving cache config                                                             \r"]
+[2.834137, "o", "                                                                                \r"]
+[2.834738, "o", "                                                                                \r"]
+[2.83578, "o", "------------------------------------------------------------------------------\r\r\n"]
+[2.836408, "o", "Archive name: root-2022-02-20T12:02:57\r\r\n"]
+[2.837106, "o", "Archive fingerprint: bf366e36ceaaa428179e130296926a81ab30bfa465a444ef4494f5908c0279b5\r\r\n"]
+[2.837793, "o", "Time (start): Sun, 2022-02-20 12:02:57\r\r\n"]
+[2.838398, "o", "Time (end):   Sun, 2022-02-20 12:02:57\r\r\n"]
+[2.838952, "o", "Duration: 0.01 seconds\r\r\n"]
+[2.839508, "o", "Number of files: 0\r\r\n"]
+[2.840057, "o", "Utilization of max. archive size: 0%\r\r\n"]
+[2.840599, "o", "------------------------------------------------------------------------------\r\r\n"]
+[2.841145, "o", "                       Original size      Compressed size    Deduplicated size\r\r\n"]
+[2.841784, "o", "This archive:                  611 B                634 B                634 B\r\r\n"]
+[2.842287, "o", "All archives:                1.18 kB              1.24 kB              1.24 kB\r\r\n"]
+[2.842826, "o", "\r\r\n"]
+[2.843359, "o", "                       Unique chunks         Total chunks\r\r\n"]
+[2.84393, "o", "Chunk index:                       4                    4\r\r\n"]
+[2.844438, "o", "------------------------------------------------------------------------------\r\r\n"]
+[2.910592, "o", "$ "]
+[2.910885, "o", "\r\r\n$ "]
+[2.911281, "o", "# Or let's backup a device via STDIN.\r\r\n$ "]
+[2.911592, "o", "sudo dd if=/dev/loop0 bs=10M | borg create --progress --stats ::specialbackup -\r\r\n"]
+[3.793054, "o", "Initializing cache transaction: Reading config                                  \r"]
+[3.794119, "o", "Initializing cache transaction: Reading chunks                                  \r"]
+[3.795088, "o", "Initializing cache transaction: Reading files                                   \r"]
+[3.79596, "o", "                                                                                \r"]
+[3.807232, "o", "8.39 MB O 32.95 kB C 32.95 kB D 0 N stdin                                       \r"]
+[4.038709, "o", "33.55 MB O 131.80 kB C 32.95 kB D 0 N stdin                                     \r"]
+[4.305714, "o", "67.11 MB O 263.60 kB C 32.95 kB D 0 N stdin                                     \r"]
+[4.572582, "o", "100.66 MB O 395.40 kB C 32.95 kB D 0 N stdin                                    \r"]
+[4.790852, "o", "125.83 MB O 494.25 kB C 32.95 kB D 0 N stdin                                    \r"]
+[5.063343, "o", "159.38 MB O 626.05 kB C 32.95 kB D 0 N stdin                                    \r"]
+[5.273236, "o", "184.55 MB O 724.90 kB C 32.95 kB D 0 N stdin                                    \r"]
+[5.507001, "o", "209.72 MB O 823.75 kB C 32.95 kB D 0 N stdin                                    \r"]
+[5.715466, "o", "234.88 MB O 922.60 kB C 32.95 kB D 0 N stdin                                    \r"]
+[5.987845, "o", "268.44 MB O 1.05 MB C 32.95 kB D 0 N stdin                                      \r"]
+[6.200972, "o", "293.60 MB O 1.15 MB C 32.95 kB D 0 N stdin                                      \r"]
+[6.415648, "o", "318.77 MB O 1.25 MB C 32.95 kB D 0 N stdin                                      \r"]
+[6.629451, "o", "343.93 MB O 1.35 MB C 32.95 kB D 0 N stdin                                      \r"]
+[6.852828, "o", "369.10 MB O 1.45 MB C 32.95 kB D 0 N stdin                                      \r"]
+[7.057548, "o", "394.26 MB O 1.55 MB C 32.95 kB D 0 N stdin                                      \r"]
+[7.241721, "o", "40+0 records in\r\r\n40+0 records out\r\r\n"]
+[7.241906, "o", "419430400 bytes (419 MB, 400 MiB) copied, 4.3209 s, 97.1 MB/s\r\r\n"]
+[7.271097, "o", "419.43 MB O 1.65 MB C 32.95 kB D 0 N stdin                                      \r"]
+[7.280572, "o", "Compacting segments   0%                                                        \r"]
+[7.283001, "o", "Compacting segments  50%                                                        \r"]
+[7.283328, "o", "                                                                                \r"]
+[7.290259, "o", "Saving chunks cache                                                             \r"]
+[7.291476, "o", "Saving cache config                                                             \r"]
+[7.294113, "o", "                                                                                \r"]
+[7.29441, "o", "                                                                                \r"]
+[7.295502, "o", "------------------------------------------------------------------------------\r\r\n"]
+[7.296041, "o", "Archive name: specialbackup\r\r\n"]
+[7.296629, "o", "Archive fingerprint: ee410fc4ee7e5182ae81162c877d1dd6d2cccdae0989611b4f3b6cf50f5dcbfa\r\r\n"]
+[7.296965, "o", "Time (start): Sun, 2022-02-20 12:02:58\r\r\n"]
+[7.298555, "o", "Time (end):   Sun, 2022-02-20 12:03:01\r\r\nDuration: 3.54 seconds\r\r\nNumber of files: 1\r\r\nUtilization of max. archive size: 0%\r\r\n------------------------------------------------------------------------------\r\r\n                       Original size      Compressed size    Deduplicated size\r\r\nThis archive:              419.43 MB              1.65 MB             33.60 kB\r\r\nAll archives:              419.43 MB              1.65 MB             34.85 kB\r\r\n\r\r\n                       Unique chunks         Total chunks\r\r\nChunk index:                       7                   56\r\r\n------------------------------------------------------------------------------\r\r\n"]
+[7.364477, "o", "$ "]
+[7.36517, "o", "\r\r\n$ "]
+[7.365432, "o", "# Let's continue with some simple things:\r\r\n$ "]
+[7.36585, "o", "## USEFUL COMMANDS ##\r\r\n$ "]
+[7.366208, "o", "# You can show some information about an archive. You can even do it without needing to specify the archive name:\r\r\n$ "]
+[7.366539, "o", "borg info :: --last 1\r\r\n"]
+[8.114038, "o", "Archive name: specialbackup\r\r\nArchive fingerprint: ee410fc4ee7e5182ae81162c877d1dd6d2cccdae0989611b4f3b6cf50f5dcbfa\r\r\nComment: \r\r\nHostname: bullseye\r\r\nUsername: root\r\r\nTime (start): Sun, 2022-02-20 12:02:58\r\r\nTime (end): Sun, 2022-02-20 12:03:01\r\r\nDuration: 3.54 seconds\r\r\nNumber of files: 1\r\r\nCommand line: borg create --progress --stats ::specialbackup -\r\r\nUtilization of max. archive size: 0%\r\r\n------------------------------------------------------------------------------\r\r\n                       Original size      Compressed size    Deduplicated size\r\r\nThis archive:              419.43 MB              1.65 MB             33.60 kB\r\r\nAll archives:              419.43 MB              1.65 MB             34.85 kB\r\r\n\r\r\n                       Unique chunks         Total chunks\r\r\nChunk index:                       7                   56"]
+[8.114572, "o", "\r\r\n"]
+[8.186113, "o", "$ "]
+[8.186659, "o", "\r\r\n$ "]
+[8.187037, "o", "# So let's rename our last archive:\r\r\n$ "]
+[8.18752, "o", "borg rename ::specialbackup backup-block-device\r\r\n"]
+[9.036784, "o", "$ "]
+[9.037601, "o", "\r\r\n$ borg info :: --last 1\r\r\n"]
+[9.772262, "o", "Archive name: backup-block-device\r\r\nArchive fingerprint: 180d34ab0487e58cb0149135073b083174abb55bb599bcabd8690af915d2bbf8\r\r\nComment: \r\r\nHostname: bullseye\r\r\nUsername: root\r\r\nTime (start): Sun, 2022-02-20 12:02:58\r\r\nTime (end): Sun, 2022-02-20 12:03:01\r\r\nDuration: 3.54 seconds\r\r\nNumber of files: 1\r\r\nCommand line: borg create --progress --stats ::specialbackup -\r\r\nUtilization of max. archive size: 0%"]
+[9.772874, "o", "\r\r\n------------------------------------------------------------------------------\r\r\n                       Original size      Compressed size    Deduplicated size\r\r\nThis archive:              419.43 MB              1.65 MB             33.62 kB\r\r\nAll archives:              419.43 MB              1.65 MB             34.86 kB\r\r\n\r\r\n                       Unique chunks         Total chunks\r\r\nChunk index:                       7                   56\r\r\n"]
+[9.841134, "o", "$ "]
+[9.841683, "o", "\r\r\n$ "]
+[9.842096, "o", "# A very important step if you choose keyfile mode (where the keyfile is only saved locally) is to export your keyfile and possibly print it, etc.\r\r\n$ "]
+[9.842325, "o", "borg key export --qr-html :: file.html  # this creates a nice HTML, but when you want something simpler…\r\r\n"]
+[10.539252, "o", "$ "]
+[10.539706, "o", "borg key export --paper ::  # this is a \"manual input\"-only backup (but it is also included in the --qr-code option)\r\r\n"]
+[11.504794, "o", "To restore key use borg key import --paper /path/to/repo\r\r\n\r\r\nBORG PAPER KEY v1\r\r\nid: 20 / f5aeeb 9c2eb3 f076b9 / bd12d0 360116 - 7b\r\r\n 1: 86a961 6c676f 726974 686da6 736861 323536 - 14\r\r\n 2: a46461 7461da 00de92 b42c18 98dbdb fc4e5a - 88\r\r\n 3: 1d3041 fb99cf d54fe6 5e8f3e f28301 4f3243 - 6b\r\r\n 4: f1f0dc 3d87ed 374b33 cc9f4e b665f8 657395 - 8e\r\r\n 5: 7904db 97935f 520f61 cc0502 b9ae21 c75711 - cb\r\r\n 6: ced56a 7f2837 88b3e2 a04458 36b7d6 f5abb6 - 4f\r\r\n 7: ebefa1 77253e 222b79 bc2020 203aef ce52c1 - e7\r\r\n 8: 631ebe 569599 ffe9bc aac984 541678 6ac363 - 13\r\r\n 9: dcc1bf 79d46f b81a0b 174478 b16315 046e43 - 8c\r\r\n10: c467f6 d7ddd8 5b1d69 99b497 67946e 2dff4b - bf\r\r\n11: cefda8 d2f35d e7740e dc8477 e3d623 0561c1 - 58\r\r\n12: 6500ad 2f134d 9e1fbe 275492 5b8b07 0b9ce6 - 8f\r\r\n13: 52ac97 d31f46 c80992 bfad46 a96c45 9aaac1 - 33\r\r\n14: e76fc9 2ab34d ca367a dc63ad 0a25a4 686173 - c9\r\r\n15: 68da00 2086be 876906 383880 af7717 5a6cca - ce\r\r\n16: 0a6345 8f73f1 906aa6 0526b2 7bbaa1 40d076 - c8\r\r\n17: aa6974 657261 74696f 6e73ce 000186 a0"]
+[11.504862, "o", "a473 - 15\r\r\n18: 616c74 da0020 36e3c3 9c265b e55eff d2105a - b9\r\r\n19: e78f09 1ca18b 4c5064 12fc54 0c9bad 7d779e - 09\r\r\n20: 7834a7 766572 73696f 6e01 - aa\r\r\n\r\r\n"]
+[11.57395, "o", "$ "]
+[11.574019, "o", "\r\r\n$ "]
+[11.574353, "o", "## MAINTENANCE ##\r\r\n$ # Sometimes backups get broken or we want a regular \"checkup\" that everything is okay…\r\r\n$ "]
+[11.574886, "o", "borg check -v ::\r\r\n"]
+[12.206362, "o", "Starting repository check\r\r\n"]
+[12.210508, "o", "Starting repository index check\r\r\nCompleted repository check, no problems found.\r\r\n"]
+[12.211066, "o", "Starting archive consistency check...\r\r\n"]
+[12.312348, "o", "Analyzing archive root-2022-02-20T12:02:56 (1/3)\r\r\n"]
+[12.317118, "o", "Analyzing archive root-2022-02-20T12:02:57 (2/3)\r\r\n"]
+[12.318394, "o", "Analyzing archive backup-block-device (3/3)\r\r\n"]
+[12.319741, "o", "Archive consistency check complete, no problems found.\r\r\n"]
+[12.386165, "o", "$ "]
+[12.386259, "o", "\r\r\n$ # Next problem: Usually you do not have infinite disk space. So you may need to prune your archive…\r\r\n"]
+[12.386794, "o", "$ "]
+[12.387235, "o", "# You can tune this in every detail. See the docs for details. Here only a simple example:\r\r\n$ borg prune --list --keep-last 1 --dry-run\r\r\n"]
+[13.700159, "o", "Keeping archive: backup-block-device                  Sun, 2022-02-20 12:02:58 [180d34ab0487e58cb0149135073b083174abb55bb599bcabd8690af915d2bbf8]\r\r\n"]
+[13.700383, "o", "Would prune:     root-2022-02-20T12:02:57             Sun, 2022-02-20 12:02:57 [bf366e36ceaaa428179e130296926a81ab30bfa465a444ef4494f5908c0279b5]\r\r\n"]
+[13.701238, "o", "Would prune:     root-2022-02-20T12:02:56             Sun, 2022-02-20 12:02:56 [5d472474590d87bb0384a87d2e8ff807e8cc341dd5b0131c7e4bbfe07493439a]\r\r\n"]
+[13.7649, "o", "$ "]
+[13.765526, "o", "# When actually executing it in a script, you have to use it without the --dry-run option, of course.\r\r\n$ "]
+[13.766058, "o", "\r\r\n$ "]
+[13.766591, "o", "## RESTORE ##\r\r\n$ "]
+[13.767143, "o", "\r\r\n$ "]
+[13.767625, "o", "# When you want to see the diff between two archives use this command.\r\r\n$ "]
+[13.768085, "o", "# E.g. what happened between the first two backups?\r\r\n$ "]
+[13.768435, "o", "borg diff ::backup1 backup2\r\r\n"]
+[14.529526, "o", "Archive backup1 does not exist\r\r\n"]
+[14.578359, "o", "$ "]
+[14.579135, "o", "# Ah, we added a file, right…\r\r\n$ "]
+[14.579518, "o", "\r\r\n$ "]
+[14.579909, "o", "# There are also other ways to extract the data.\r\r\n$ "]
+[14.580319, "o", "# E.g. as a tar archive.\r\r\n$ "]
+[14.580915, "o", "borg export-tar --progress ::backup2 backup.tar.gz\r\r\n"]
+[15.733621, "o", "Archive backup2 does not exist\r\r\n"]
+[15.799754, "o", "$ "]
+[15.800319, "o", "ls -l\r\r\n"]
+[15.802251, "o", "total 474096\r\r\n"]
+[15.802852, "o", "drwxr-xr-x 2 root root      4096 Feb 20 11:23 Wallpaper\r\r\n-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64\r\r\n-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64.1\r\r\n-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64.2\r\r\n-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64.3\r\r\n-rw-r--r-- 1 root root  13173712 Dec  7 21:44 borg-linux64.4\r\r\n-rw-r--r-- 1 root root       819 Dec  7 21:44 borg-linux64.asc\r\r\n-rw-r--r-- 1 root root       819 Dec  7 21:44 borg-linux64.asc.1\r\r\n-rw-r--r-- 1 root root       819 Dec  7 21:44 borg-linux64.asc.2\r\r\n"]
+[15.803398, "o", "-rw------- 1 root root     66580 Feb 20 12:03 file.html\r\r\n-rw-r--r-- 1 root root 419430400 Feb 20 12:02 loopbackfile.img\r\r\n-rw-r--r-- 1 root root         0 Feb 20 11:14 wget-log\r\r\n-rw-r--r-- 1 root root         0 Feb 20 11:40 wget-log.1\r\r\n-rw------- 1 root root     66580 Feb 20 12:01 x\r\r\n"]
+[15.804332, "o", "$ "]
+[15.805251, "o", "\r\r\n$ "]
+[15.805717, "o", "# You can mount an archive or even the whole repository:\r\r\n$ "]
+[15.805966, "o", "mkdir /tmp/mount\r\r\n"]
+[15.807757, "o", "mkdir: cannot create directory ‘/tmp/mount’: File exists\r\r\n"]
+[15.808333, "o", "$ "]
+[15.80881, "o", "borg mount :: /tmp/mount\r\r\n"]
+[16.751989, "o", "$ "]
+[16.752277, "o", "ls -la /tmp/mount\r\r\n"]
+[16.756566, "o", "total 4"]
+[16.756895, "o", "\r\r\n"]
+[16.757473, "o", "drwxr-xr-x  1 root root    0 Feb 20 12:03 ."]
+[16.757751, "o", "\r\r\n"]
+[16.758244, "o", "drwxrwxrwt 11 root root 4096 Feb 20 12:03 .."]
+[16.758492, "o", "\r\r\n"]
+[16.758963, "o", "drwxr-xr-x  1 root root    0 Feb 20 12:03 backup-block-device"]
+[16.759301, "o", "\r\r\n"]
+[16.759655, "o", "drwxr-xr-x  1 root root    0 Feb 20 12:03 root-2022-02-20T12:02:56"]
+[16.760005, "o", "\r\r\n"]
+[16.760352, "o", "drwxr-xr-x  1 root root    0 Feb 20 12:03 root-2022-02-20T12:02:57"]
+[16.760694, "o", "\r\r\n"]
+[16.761508, "o", "$ borg umount /tmp/mount\r\r\n"]
+[17.765275, "o", "$ "]
+[17.765877, "o", "\r\r\n$ # That's it, but of course there is more to explore, so have a look at the docs.\r\r\n"]
+[17.765995, "o", "$ "]

+ 2 - 2
docs/misc/asciinema/advanced.tcl

@@ -37,8 +37,8 @@ borg rename ::specialbackup backup-block-device
 borg info :: --last 1
 
 # A very important step if you choose keyfile mode (where the keyfile is only saved locally) is to export your keyfile and possibly print it, etc.
-borg key export :: --qr-html file.html  # this creates a nice HTML, but when you want something simpler…
-borg key export :: --paper  # this is a "manual input"-only backup (but it is also included in the --qr-code option)
+borg key export --qr-html :: file.html  # this creates a nice HTML, but when you want something simpler…
+borg key export --paper ::  # this is a "manual input"-only backup (but it is also included in the --qr-code option)
 
 ## MAINTENANCE ##
 # Sometimes backups get broken or we want a regular "checkup" that everything is okay…