{"id":1617,"date":"2022-01-22T20:59:32","date_gmt":"2022-01-22T20:59:32","guid":{"rendered":"http:\/\/www.ishygddt.xyz\/~blog\/?p=1617"},"modified":"2023-01-30T19:18:19","modified_gmt":"2023-01-31T01:18:19","slug":"optical-tape-archives","status":"publish","type":"post","link":"http:\/\/www.ishygddt.xyz\/~blog\/2022\/01\/optical-tape-archives","title":{"rendered":"Old-school new-school: Optical Tape Archives"},"content":{"rendered":"<p>I had come up with this \"cursed technique\" a while back at work, when I needed to transfer a ~1GB file onto a quite old Linux machine that, for \"security reasons\" had USB mass storage access as well as the UDF kernel drivers disabled (and I was unable to access it over the network).<\/p>\n<p>I've adapted the exact command to be more suitable for general use:<\/p>\n<pre><code class=\"language-shell\" data-line=\"\">sudo chgrp -v &quot;$(id -g)&quot; \/dev\/sr0 # or whatever\ntar c\\\n  -ML716800\\\n  --format=posix\\\n  -f &quot;${f=$(mktemp -t tar-XXXXXXX.iso)}&quot;\\\n  -F &#039;cdrecord -eject &quot;$TAR_ARCHIVE&quot; &amp;&amp; read -p &quot;Insert CD #${TAR_VOLUME}, CLOSE THE TRAY, then press Enter:&quot;&#039;\\\n  $files\n# Don&#039;t forget to run this afterwards\n# to avoid leaving an 0.68G junk file laying around:\nrm -v &quot;$f&quot; ; unset f<\/code><\/pre>\n<p>This will simply burn a tape-archive-formatted sequence of CD-Rs that can be extracted back onto most Unix systems with <code class=\"language-shell\" data-line=\"\">tar x -Mf &quot;\/dev\/sr0&quot;<\/code><!-- TODO: test out -F 'printf '\\''\\a'\\''' to see if it needs anything else to be viable (such as a readline) -->. The files inside this archive may be a gigabyte or larger; it'll cause no problems. <strong>When extracting, tar will automatically prompt you to load the next \"tape\" when it reaches the end of a volume.<\/strong><\/p>\n<p>The flag <code class=\"language-shell\" data-line=\"\">-L716800<\/code> simply caps the archives at 716800KiB = 734003200 bytes = 700MiB (734MB)\u2014the standard bare minimum that even the cheapest mass-market bulk vendor won't undershoot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had come up with this \"cursed technique\" a while back at work, when I needed to transfer a ~1GB file onto a quite old Linux machine that, for \"security reasons\" had USB mass storage access as well as the UDF kernel drivers disabled (and I was unable to access it over the network)\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97],"tags":[112,83,113,82],"class_list":["post-1617","post","type-post","status-publish","format-standard","hentry","category-original-content","tag-optical-discs","tag-posix","tag-serialization-formats","tag-tar"],"_links":{"self":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts\/1617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/comments?post=1617"}],"version-history":[{"count":31,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts\/1617\/revisions"}],"predecessor-version":[{"id":2480,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts\/1617\/revisions\/2480"}],"wp:attachment":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/media?parent=1617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/categories?post=1617"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/tags?post=1617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}