1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 08:16:54 +00:00
borg/docs/misc/asciinema/advanced.json
2022-07-06 17:19:10 +02:00

247 lines
20 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version": 2, "width": 80, "height": 24, "timestamp": 1645359591, "env": {"SHELL": "/bin/bash", "TERM": "vt100"}}
[0.59423, "o", "$ "]
[0.59506, "o", "# For the pro users, here are some advanced features of borg, so you can impress your friends. ;)\r\r\n$ # Note: This screencast was made with borg 1.1.0b6 older or newer borg versions may behave differently.\r\r\n$ \r\r\n$ "]
[0.595309, "o", "# First of all, we can use several environment variables for borg.\r\r\n$ "]
[0.596542, "o", "# E.g. we do not want to type in our repo path and password again and again…\r\r\n$ export BORG_REPO='/media/backup/borgdemo'\r\r\n$ export BORG_PASSPHRASE='1234'\r\r\n$ # Problem solved, borg will use this automatically… :)\r\r\n$ # We'll use this right away…\r\r\n$ \r\r\n$ ## ADVANCED CREATION ##\r\r\n$ \r\r\n$ "]
[0.596977, "o", "# We can also use some placeholders in our archive name…\r\r\n$ "]
[0.597321, "o", "borg create --stats --progress --compression lz4 ::{user}-{now} Wallpaper\r\r\n"]
[1.334699, "o", "0 B O 0 B C 0 B D 0 N Wallpaper \r"]
[1.335475, "o", "Initializing cache transaction: Reading config \r"]
[1.33632, "o", "Initializing cache transaction: Reading chunks \r"]
[1.337183, "o", "Initializing cache transaction: Reading files \r"]
[1.338002, "o", " \r"]
[1.347437, "o", "Compacting segments 0% \r"]
[1.348438, "o", "Compacting segments 50% \r"]
[1.348963, "o", " \r"]
[1.369631, "o", "Saving chunks cache \rSaving cache config \r"]
[1.39013, "o", " \r"]
[1.390405, "o", " \r"]
[1.391998, "o", "------------------------------------------------------------------------------\r\r\n"]
[1.392675, "o", "Archive name: root-2022-02-20T12:19:52\r\r\nArchive fingerprint: c48519716572a46586ac32de95a93f0f5757cc2468fe9b04505d37e7629343f9\r\r\n"]
[1.393299, "o", "Time (start): Sun, 2022-02-20 12:19:52\r\r\nTime (end): Sun, 2022-02-20 12:19:53\r\r\nDuration: 0.01 seconds\r\r\n"]
[1.393919, "o", "Number of files: 0\r\r\nUtilization of max. archive size: 0%\r\r\n"]
[1.39449, "o", "------------------------------------------------------------------------------\r\r\n"]
[1.395092, "o", " Original size Compressed size Deduplicated size\r\r\nThis archive: 567 B 612 B 612 B\r\r\n"]
[1.395691, "o", "All archives: 567 B 612 B 612 B\r\r\n"]
[1.396263, "o", "\r\r\n Unique chunks Total chunks\r\r\n"]
[1.396814, "o", "Chunk index: 2 2\r\r\n"]
[1.397411, "o", "------------------------------------------------------------------------------\r\r\n"]
[1.463696, "o", "$ "]
[1.464242, "o", "# Notice the backup name.\r\r\n$ "]
[1.464985, "o", "\r\r\n$ "]
[1.465756, "o", "# And we can put completely different data, with different backup settings, in our backup. It will be deduplicated, anyway:\r\r\n$ borg create --stats --progress --compression zlib,6 --exclude ~/Downloads/big ::{user}-{now} ~/Downloads\r\r\n"]
[2.200057, "o", "0 B O 0 B C 0 B D 0 N root/Downloads \r"]
[2.200992, "o", "Initializing cache transaction: Reading config \r"]
[2.20176, "o", "Initializing cache transaction: Reading chunks \r"]
[2.202724, "o", "Initializing cache transaction: Reading files \r"]
[2.203637, "o", " \r"]
[2.212851, "o", "Compacting segments 0% \r"]
[2.21376, "o", "Compacting segments 50% \r"]
[2.214289, "o", " \r"]
[2.220682, "o", "Saving chunks cache \r"]
[2.221749, "o", "Saving cache config \r"]
[2.224239, "o", " \r"]
[2.224819, "o", " \r"]
[2.225787, "o", "------------------------------------------------------------------------------\r\r\nArchive name: root-2022-02-20T12:19:53"]
[2.226044, "o", "\r\r\n"]
[2.226689, "o", "Archive fingerprint: b9a1ec988e6c1557cc1be9e0de3999c1f0b943842d75aa2e47af7196eb44c9a8\r\r\n"]
[2.227247, "o", "Time (start): Sun, 2022-02-20 12:19:53\r\r\n"]
[2.227787, "o", "Time (end): Sun, 2022-02-20 12:19:53\r\r\n"]
[2.228368, "o", "Duration: 0.01 seconds\r\r\n"]
[2.228922, "o", "Number of files: 0\r\r\n"]
[2.229456, "o", "Utilization of max. archive size: 0%\r\r\n"]
[2.229984, "o", "------------------------------------------------------------------------------\r\r\n"]
[2.230575, "o", " Original size Compressed size Deduplicated size\r\r\n"]
[2.231195, "o", "This archive: 611 B 635 B 635 B\r\r\n"]
[2.231645, "o", "All archives: 1.18 kB 1.25 kB 1.25 kB"]
[2.231989, "o", "\r\r\n"]
[2.232544, "o", "\r\r\n"]
[2.233068, "o", " Unique chunks Total chunks\r\r\n"]
[2.23357, "o", "Chunk index: 4 4\r\r\n"]
[2.234147, "o", "------------------------------------------------------------------------------\r\r\n"]
[2.298007, "o", "$ "]
[2.298307, "o", "\r\r\n$ "]
[2.298728, "o", "# Or let's backup a device via STDIN.\r\r\n$ "]
[2.299165, "o", "sudo dd if=/dev/loop0 bs=10M | borg create --progress --stats ::specialbackup -\r\r\n"]
[3.097979, "o", "Initializing cache transaction: Reading config \r"]
[3.099079, "o", "Initializing cache transaction: Reading chunks \r"]
[3.100059, "o", "Initializing cache transaction: Reading files \r"]
[3.100868, "o", " \r"]
[3.111819, "o", "8.39 MB O 32.95 kB C 32.95 kB D 0 N stdin \r"]
[3.33613, "o", "33.55 MB O 131.80 kB C 32.95 kB D 0 N stdin \r"]
[3.600567, "o", "67.11 MB O 263.60 kB C 32.95 kB D 0 N stdin \r"]
[3.824938, "o", "92.27 MB O 362.45 kB C 32.95 kB D 0 N stdin \r"]
[4.082907, "o", "117.44 MB O 461.30 kB C 32.95 kB D 0 N stdin \r"]
[4.306264, "o", "142.61 MB O 560.15 kB C 32.95 kB D 0 N stdin \r"]
[4.542307, "o", "167.77 MB O 659.00 kB C 32.95 kB D 0 N stdin \r"]
[4.790625, "o", "192.94 MB O 757.85 kB C 32.95 kB D 0 N stdin \r"]
[5.041115, "o", "218.10 MB O 856.70 kB C 32.95 kB D 0 N stdin \r"]
[5.295711, "o", "243.27 MB O 955.55 kB C 32.95 kB D 0 N stdin \r"]
[5.535252, "o", "268.44 MB O 1.05 MB C 32.95 kB D 0 N stdin \r"]
[5.752502, "o", "293.60 MB O 1.15 MB C 32.95 kB D 0 N stdin \r"]
[5.985142, "o", "318.77 MB O 1.25 MB C 32.95 kB D 0 N stdin \r"]
[6.198501, "o", "343.93 MB O 1.35 MB C 32.95 kB D 0 N stdin \r"]
[6.411236, "o", "369.10 MB O 1.45 MB C 32.95 kB D 0 N stdin \r"]
[6.622662, "o", "394.26 MB O 1.55 MB C 32.95 kB D 0 N stdin \r"]
[6.815794, "o", "40+0 records in"]
[6.816308, "o", "\r\r\n"]
[6.816682, "o", "40+0 records out"]
[6.817018, "o", "\r\r\n"]
[6.817483, "o", "419430400 bytes (419 MB, 400 MiB) copied, 4.51055 s, 93.0 MB/s"]
[6.817841, "o", "\r\r\n"]
[6.845279, "o", "419.43 MB O 1.65 MB C 32.95 kB D 0 N stdin \r"]
[6.854436, "o", "Compacting segments 0% \r"]
[6.855697, "o", "Compacting segments 50% \r"]
[6.856331, "o", " \r"]
[6.863322, "o", "Saving chunks cache \r"]
[6.864412, "o", "Saving cache config \r"]
[6.866648, "o", " \r"]
[6.86731, "o", " \r"]
[6.868307, "o", "------------------------------------------------------------------------------"]
[6.868721, "o", "\r\r\n"]
[6.869256, "o", "Archive name: specialbackup"]
[6.869757, "o", "\r\r\n"]
[6.870309, "o", "Archive fingerprint: 820b8c5e21e31ab45708597f4319eb37b62660ed696cdc7e7be6e860d282f8bb"]
[6.870694, "o", "\r\r\n"]
[6.871189, "o", "Time (start): Sun, 2022-02-20 12:19:54"]
[6.871687, "o", "\r\r\n"]
[6.872251, "o", "Time (end): Sun, 2022-02-20 12:19:58"]
[6.872676, "o", "\r\r\n"]
[6.873216, "o", "Duration: 3.81 seconds"]
[6.873566, "o", "\r\r\n"]
[6.874146, "o", "Number of files: 1"]
[6.874523, "o", "\r\r\n"]
[6.875286, "o", "Utilization of max. archive size: 0%"]
[6.876206, "o", "\r\r\n"]
[6.878499, "o", "------------------------------------------------------------------------------"]
[6.879846, "o", "\r\r\n"]
[6.880827, "o", " Original size Compressed size Deduplicated size"]
[6.881386, "o", "\r\r\n"]
[6.882934, "o", "This archive: 419.43 MB 1.65 MB 33.60 kB"]
[6.883943, "o", "\r\r\n"]
[6.884926, "o", "All archives: 419.43 MB 1.65 MB 34.85 kB"]
[6.88533, "o", "\r\r\n"]
[6.885947, "o", "\r\r\n"]
[6.886579, "o", " Unique chunks Total chunks"]
[6.886968, "o", "\r\r\n"]
[6.887724, "o", "Chunk index: 7 56"]
[6.888019, "o", "\r\r\n"]
[6.8888, "o", "------------------------------------------------------------------------------"]
[6.889251, "o", "\r\r\n"]
[6.947428, "o", "$ "]
[6.947919, "o", "\r\r\n$ "]
[6.948415, "o", "# Let's continue with some simple things:\r\r\n$ "]
[6.948867, "o", "## USEFUL COMMANDS ##\r\r\n$ "]
[6.949356, "o", "# You can show some information about an archive. You can even do it without needing to specify the archive name:\r\r\n$ "]
[6.949754, "o", "borg info :: --last 1\r\r\n"]
[7.687363, "o", "Archive name: specialbackup"]
[7.68771, "o", "\r\r\n"]
[7.688159, "o", "Archive fingerprint: 820b8c5e21e31ab45708597f4319eb37b62660ed696cdc7e7be6e860d282f8bb\r\r\n"]
[7.688533, "o", "Comment: "]
[7.688747, "o", "\r\r\n"]
[7.689197, "o", "Hostname: bullseye"]
[7.689522, "o", "\r\r\n"]
[7.689841, "o", "Username: root"]
[7.690201, "o", "\r\r\n"]
[7.690558, "o", "Time (start): Sun, 2022-02-20 12:19:54"]
[7.690742, "o", "\r\r\n"]
[7.691233, "o", "Time (end): Sun, 2022-02-20 12:19:58"]
[7.691591, "o", "\r\r\n"]
[7.691952, "o", "Duration: 3.81 seconds"]
[7.692302, "o", "\r\r\n"]
[7.692638, "o", "Number of files: 1"]
[7.692925, "o", "\r\r\n"]
[7.69331, "o", "Command line: borg create --progress --stats ::specialbackup -"]
[7.693486, "o", "\r\r\n"]
[7.693953, "o", "Utilization of max. archive size: 0%"]
[7.694292, "o", "\r\r\n"]
[7.694627, "o", "------------------------------------------------------------------------------"]
[7.695057, "o", "\r\r\n"]
[7.69541, "o", " Original size Compressed size Deduplicated size"]
[7.695772, "o", "\r\r\nThis archive: 419.43 MB 1.65 MB 33.60 kB\r\r\n"]
[7.696076, "o", "All archives: 419.43 MB 1.65 MB 34.85 kB"]
[7.696376, "o", "\r\r\n"]
[7.696712, "o", "\r\r\n"]
[7.697086, "o", " Unique chunks Total chunks"]
[7.697423, "o", "\r\r\n"]
[7.697773, "o", "Chunk index: 7 56"]
[7.698249, "o", "\r\r\n"]
[7.761029, "o", "$ "]
[7.761367, "o", "\r\r\n$ "]
[7.761784, "o", "# So let's rename our last archive:\r\r\n$ "]
[7.762131, "o", "borg rename ::specialbackup backup-block-device\r\r\n"]
[8.58415, "o", "$ "]
[8.584458, "o", "\r\r\n$ "]
[8.584766, "o", "borg info :: --last 1\r\r\n"]
[9.605923, "o", "Archive name: backup-block-device\r\r\nArchive fingerprint: ba2742e5e06145d314a6266329beab8622ec7114672bf261e3b739fbe02fe85d\r\r\nComment: \r\r\nHostname: bullseye\r\r\nUsername: root\r\r\nTime (start): Sun, 2022-02-20 12:19:54\r\r\nTime (end): Sun, 2022-02-20 12:19:58\r\r\nDuration: 3.81 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.87 kB\r\r\n\r\r\n Unique chunks Total chunks\r\r\nChunk index: 7 56\r\r\n"]
[9.670104, "o", "$ "]
[9.670819, "o", "\r\r\n$ "]
[9.67128, "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.671624, "o", "borg key export --qr-html :: file.html # this creates a nice HTML, but when you want something simpler…\r\r\n"]
[10.353313, "o", "$ "]
[10.353661, "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.000878, "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 / dffb6f 0ed77d d86932 / 509a09 fd58d7 - 63\r\r\n 1: 86a961 6c676f 726974 686da6 736861 323536 - 14\r\r\n 2: a46461 7461da 00de19 8b755f ff2fd3 235324 - 11\r\r\n 3: dfba85 e40d1d 8cb237 462323 966dff 565118 - a4\r\r\n 4: fcdafb 452008 6e52a6 6d05d4 fa744b 6e61c1 - e4\r\r\n 5: 4c90a2 8b6b47 0dcf1b 3b008a dccf97 8bda2b - 6e\r\r\n 6: b019bb 712d12 c8e291 98abf3 ec5890 bff5be - 91\r\r\n 7: dba6fe 1204ee 3931c0 c3239c c6197a 7c4332 - 4d\r\r\n 8: e83060 56add9 02050d b2a52b b12856 5c6760 - d4\r\r\n 9: 0f035e 3fd919 dadc86 f8c0ac b34abe 4305fb - a4\r\r\n10: 3fdf76 9c22f0 3477ec fffc9d 83af63 ad69d6 - 2d\r\r\n11: 18883e f29a27 98d562 f62011 422162 9943cb - f5\r\r\n12: 5b2a42 738626 2ae699 672534 ad3e88 ad715b - 3b\r\r\n13: 3bb9f2 bb6aec f9c88d aec2f5 cc2498 8b882e - 5b\r\r\n14: a69652 faa516 ef7e52 fa6c5d e0b4a4 686173 - 5d\r\r\n15: 68da00 206684 d35467 ff2223 578fdc 5cd237 - 76\r\r\n16: b53eb4 a6e17d c2a5b8 600abf c275ad f107b6 - 55\r\r\n17: aa6974 657261 74696f 6e73ce 000186 a0"]
[11.000988, "o", "a473 - 15\r\r\n18: 616c74 da0020 bda812 3bafcc 07b169 53ca5d - d9\r\r\n19: 712aec 14b25f 0f6f6c 2a2f40 3296a8 598d81 - 97\r\r\n20: c681a7 766572 73696f 6e01 - 1c\r\r\n\r\r\n"]
[11.063382, "o", "$ "]
[11.064015, "o", "\r\r\n$ "]
[11.064237, "o", "## MAINTENANCE ##\r\r\n$ "]
[11.064686, "o", "# Sometimes backups get broken or we want a regular \"checkup\" that everything is okay…\r\r\n$ borg check -v ::\r\r\n"]
[12.024831, "o", "Starting repository check\r\r\n"]
[12.02845, "o", "Starting repository index check\r\r\nCompleted repository check, no problems found.\r\r\nStarting archive consistency check...\r\r\n"]
[12.148344, "o", "Analyzing archive root-2022-02-20T12:19:52 (1/3)\r\r\n"]
[12.153183, "o", "Analyzing archive root-2022-02-20T12:19:53 (2/3)\r\r\n"]
[12.15445, "o", "Analyzing archive backup-block-device (3/3)\r\r\n"]
[12.155851, "o", "Archive consistency check complete, no problems found.\r\r\n"]
[12.219291, "o", "$ \r\r\n"]
[12.219711, "o", "$ "]
[12.220138, "o", "# Next problem: Usually you do not have infinite disk space. So you may need to"]
[12.220294, "o", " prune your archive…\r\r\n$ "]
[12.220613, "o", "# You can tune this in every detail. See the docs for details. Here only a simple example:\r\r\n$ "]
[12.22077, "o", "borg prune --list --keep-last 1 --dry-run\r"]
[12.220971, "o", "\r\n"]
[13.083465, "o", "Keeping archive: backup-block-device Sun, 2022-02-20 12:19:54 [ba2742e5e06145d314a6266329beab8622ec7114672bf261e3b739fbe02fe85d]\r\r\nWould prune: root-2022-02-20T12:19:53 Sun, 2022-02-20 12:19:53 [b9a1ec988e6c1557cc1be9e0de3999c1f0b943842d75aa2e47af7196eb44c9a8]\r"]
[13.083539, "o", "\r\nWould prune: root-2022-02-20T12:19:52 Sun, 2022-02-20 12:19:52 [c48519716572a46586ac32de95a93f0f5757cc2468fe9b04505d37e7629343f9]"]
[13.084538, "o", "\r\r\n"]
[13.1492, "o", "$ "]
[13.149262, "o", "# When actually executing it in a script, you have to use it without the --dry-run option, of course.\r\r\n$ "]
[13.149603, "o", "\r\r\n$ ## RESTORE ##\r\r\n$ "]
[13.149873, "o", "\r\r\n$ "]
[13.150153, "o", "# When you want to see the diff between two archives use this command.\r\r\n$ "]
[13.15063, "o", "# E.g. what happened between the first two backups?\r\r\n$ "]
[13.150838, "o", "borg diff ::backup1 backup2\r\r\n"]
[14.171601, "o", "Archive backup1 does not exist\r\r\n"]
[14.240411, "o", "$ "]
[14.241107, "o", "# Ah, we added a file, right…\r\r\n$ "]
[14.241182, "o", "\r\r\n"]
[14.241785, "o", "$ # There are also other ways to extract the data.\r\r\n$ "]
[14.241871, "o", "# E.g. as a tar archive.\r\r\n$ "]
[14.242383, "o", "borg export-tar --progress ::backup2 backup.tar.gz\r\r\n"]
[14.983521, "o", "Archive backup2 does not exist\r\r\n"]
[15.036922, "o", "$ "]
[15.036988, "o", "ls -l\r\r\n"]
[15.03886, "o", "total 474092\r\r\n"]
[15.038929, "o", "drwxr-xr-x 2 root root 4096 Feb 20 11:23 Wallpaper"]
[15.039319, "o", "\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"]
[15.039405, "o", "\r\r\n-rw-r--r-- 1 root root 13173712 Dec 7 21:44 borg-linux64.2\r\r\n"]
[15.039774, "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"]
[15.039861, "o", "-rw-r--r-- 1 root root 819 Dec 7 21:44 borg-linux64.asc\r\r\n"]
[15.040161, "o", "-rw-r--r-- 1 root root 819 Dec 7 21:44 borg-linux64.asc.1\r\r\n"]
[15.040206, "o", "-rw-r--r-- 1 root root 819 Dec 7 21:44 borg-linux64.asc.2\r\r\n"]
[15.040633, "o", "-rw------- 1 root root 66580 Feb 20 12:20 file.html\r\r\n-rw-r--r-- 1 root root 419430400 Feb 20 12:19 loopbackfile.img"]
[15.040682, "o", "\r\r\n"]
[15.041336, "o", "-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"]
[15.041402, "o", "\r\r\n"]
[15.042167, "o", "$ "]
[15.042714, "o", "\r\r\n$ "]
[15.043147, "o", "# You can mount an archive or even the whole repository:\r\r\n$ "]
[15.044705, "o", "mkdir /tmp/mount\r\r\n"]
[15.048251, "o", "mkdir: cannot create directory /tmp/mount: File exists\r\r\n"]
[15.049135, "o", "$ "]
[15.050011, "o", "borg mount :: /tmp/mount\r\r\n"]
[15.798691, "o", "$ "]
[15.799719, "o", "ls -la /tmp/mount\r\r\n"]
[15.804725, "o", "total 4\r\r\ndrwxr-xr-x 1 root root 0 Feb 20 12:20 .\r\r\ndrwxrwxrwt 11 root root 4096 Feb 20 12:20 ..\r\r\ndrwxr-xr-x 1 root root 0 Feb 20 12:20 backup-block-device\r\r\ndrwxr-xr-x 1 root root 0 Feb 20 12:20 root-2022-02-20T12:19:52\r\r\ndrwxr-xr-x 1 root root 0 Feb 20 12:20 root-2022-02-20T12:19:53\r\r\n$ "]
[15.805681, "o", "borg umount /tmp/mount\r\r\n"]
[16.79573, "o", "$ "]
[16.796517, "o", "\r\r\n$ "]
[16.796977, "o", "# That's it, but of course there is more to explore, so have a look at the docs.\r\r\n$ "]