What is a safe way to dump data from a tape drive when you are not completely certain what is inside?












1















I have an old tape drive and old tape that I recently found. I was able to get the tape drive connected to Linux and executed the following commands:



mt -f /dev/nst0 rewind
dd if=/dev/nst0 of=dump.file


My question is, if you do not know what format the tape was created under, what is the safest way to use dd? On the flip side, if you knew all the files were tar files, what would you then do?










share|improve this question




















  • 1





    "Safe" in what sense? What problem(s) are you expecting and wish to avoid?

    – ilkkachu
    Nov 8 '18 at 13:49
















1















I have an old tape drive and old tape that I recently found. I was able to get the tape drive connected to Linux and executed the following commands:



mt -f /dev/nst0 rewind
dd if=/dev/nst0 of=dump.file


My question is, if you do not know what format the tape was created under, what is the safest way to use dd? On the flip side, if you knew all the files were tar files, what would you then do?










share|improve this question




















  • 1





    "Safe" in what sense? What problem(s) are you expecting and wish to avoid?

    – ilkkachu
    Nov 8 '18 at 13:49














1












1








1








I have an old tape drive and old tape that I recently found. I was able to get the tape drive connected to Linux and executed the following commands:



mt -f /dev/nst0 rewind
dd if=/dev/nst0 of=dump.file


My question is, if you do not know what format the tape was created under, what is the safest way to use dd? On the flip side, if you knew all the files were tar files, what would you then do?










share|improve this question
















I have an old tape drive and old tape that I recently found. I was able to get the tape drive connected to Linux and executed the following commands:



mt -f /dev/nst0 rewind
dd if=/dev/nst0 of=dump.file


My question is, if you do not know what format the tape was created under, what is the safest way to use dd? On the flip side, if you knew all the files were tar files, what would you then do?







linux tape






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 '18 at 10:45









Fabby

3,93811329




3,93811329










asked Nov 8 '18 at 10:34









user321627user321627

1303




1303








  • 1





    "Safe" in what sense? What problem(s) are you expecting and wish to avoid?

    – ilkkachu
    Nov 8 '18 at 13:49














  • 1





    "Safe" in what sense? What problem(s) are you expecting and wish to avoid?

    – ilkkachu
    Nov 8 '18 at 13:49








1




1





"Safe" in what sense? What problem(s) are you expecting and wish to avoid?

– ilkkachu
Nov 8 '18 at 13:49





"Safe" in what sense? What problem(s) are you expecting and wish to avoid?

– ilkkachu
Nov 8 '18 at 13:49










2 Answers
2






active

oldest

votes


















3














From the this article on dd:




dd reads and writes data by blocks, and can convert the data between
formats. dd is frequently used for devices such as tapes which have
discrete block sizes, or for fast multi-sector reads from disks




dd will read raw bytes from one file (or device) and write it to another. It doesn't care (or even know) about file systems or file formats. All it sees are blocks of ones and zeros.



Note that you may (or may not) need to swap endian-ness if the tape was written on a big-endian machine, which used to be more popular.



You can do this as described here:



dd if=/dev/nst0 of=dump.file ibs=20b conv=swab



By the way, dd won't change anything on the input file (if). It only writes to the output file (of). So, it won't harm the data on your tape, if that's what you're worried about.






share|improve this answer

































    1














    I've recently written a tool called tapeimgr that automatically extracts all files from a tape. Internally it wraps around dd and mt. More info here:



    https://github.com/KBNLresearch/tapeimgr



    It also automatically determines the block size (which can be pretty tedious to do manually). Byte swapping is not supported (yet), but having read @layne-bernardo's answer I've put this on the to-do list for an upcoming release. Disclaimer:: so far I've only tested the tool with a limited number of DDS and DLT-IV tapes, as well as a virtual tape library, so use at your own risk!






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480541%2fwhat-is-a-safe-way-to-dump-data-from-a-tape-drive-when-you-are-not-completely-ce%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      From the this article on dd:




      dd reads and writes data by blocks, and can convert the data between
      formats. dd is frequently used for devices such as tapes which have
      discrete block sizes, or for fast multi-sector reads from disks




      dd will read raw bytes from one file (or device) and write it to another. It doesn't care (or even know) about file systems or file formats. All it sees are blocks of ones and zeros.



      Note that you may (or may not) need to swap endian-ness if the tape was written on a big-endian machine, which used to be more popular.



      You can do this as described here:



      dd if=/dev/nst0 of=dump.file ibs=20b conv=swab



      By the way, dd won't change anything on the input file (if). It only writes to the output file (of). So, it won't harm the data on your tape, if that's what you're worried about.






      share|improve this answer






























        3














        From the this article on dd:




        dd reads and writes data by blocks, and can convert the data between
        formats. dd is frequently used for devices such as tapes which have
        discrete block sizes, or for fast multi-sector reads from disks




        dd will read raw bytes from one file (or device) and write it to another. It doesn't care (or even know) about file systems or file formats. All it sees are blocks of ones and zeros.



        Note that you may (or may not) need to swap endian-ness if the tape was written on a big-endian machine, which used to be more popular.



        You can do this as described here:



        dd if=/dev/nst0 of=dump.file ibs=20b conv=swab



        By the way, dd won't change anything on the input file (if). It only writes to the output file (of). So, it won't harm the data on your tape, if that's what you're worried about.






        share|improve this answer




























          3












          3








          3







          From the this article on dd:




          dd reads and writes data by blocks, and can convert the data between
          formats. dd is frequently used for devices such as tapes which have
          discrete block sizes, or for fast multi-sector reads from disks




          dd will read raw bytes from one file (or device) and write it to another. It doesn't care (or even know) about file systems or file formats. All it sees are blocks of ones and zeros.



          Note that you may (or may not) need to swap endian-ness if the tape was written on a big-endian machine, which used to be more popular.



          You can do this as described here:



          dd if=/dev/nst0 of=dump.file ibs=20b conv=swab



          By the way, dd won't change anything on the input file (if). It only writes to the output file (of). So, it won't harm the data on your tape, if that's what you're worried about.






          share|improve this answer















          From the this article on dd:




          dd reads and writes data by blocks, and can convert the data between
          formats. dd is frequently used for devices such as tapes which have
          discrete block sizes, or for fast multi-sector reads from disks




          dd will read raw bytes from one file (or device) and write it to another. It doesn't care (or even know) about file systems or file formats. All it sees are blocks of ones and zeros.



          Note that you may (or may not) need to swap endian-ness if the tape was written on a big-endian machine, which used to be more popular.



          You can do this as described here:



          dd if=/dev/nst0 of=dump.file ibs=20b conv=swab



          By the way, dd won't change anything on the input file (if). It only writes to the output file (of). So, it won't harm the data on your tape, if that's what you're worried about.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 1 min ago

























          answered Nov 8 '18 at 11:43









          Layne BernardoLayne Bernardo

          1415




          1415

























              1














              I've recently written a tool called tapeimgr that automatically extracts all files from a tape. Internally it wraps around dd and mt. More info here:



              https://github.com/KBNLresearch/tapeimgr



              It also automatically determines the block size (which can be pretty tedious to do manually). Byte swapping is not supported (yet), but having read @layne-bernardo's answer I've put this on the to-do list for an upcoming release. Disclaimer:: so far I've only tested the tool with a limited number of DDS and DLT-IV tapes, as well as a virtual tape library, so use at your own risk!






              share|improve this answer




























                1














                I've recently written a tool called tapeimgr that automatically extracts all files from a tape. Internally it wraps around dd and mt. More info here:



                https://github.com/KBNLresearch/tapeimgr



                It also automatically determines the block size (which can be pretty tedious to do manually). Byte swapping is not supported (yet), but having read @layne-bernardo's answer I've put this on the to-do list for an upcoming release. Disclaimer:: so far I've only tested the tool with a limited number of DDS and DLT-IV tapes, as well as a virtual tape library, so use at your own risk!






                share|improve this answer


























                  1












                  1








                  1







                  I've recently written a tool called tapeimgr that automatically extracts all files from a tape. Internally it wraps around dd and mt. More info here:



                  https://github.com/KBNLresearch/tapeimgr



                  It also automatically determines the block size (which can be pretty tedious to do manually). Byte swapping is not supported (yet), but having read @layne-bernardo's answer I've put this on the to-do list for an upcoming release. Disclaimer:: so far I've only tested the tool with a limited number of DDS and DLT-IV tapes, as well as a virtual tape library, so use at your own risk!






                  share|improve this answer













                  I've recently written a tool called tapeimgr that automatically extracts all files from a tape. Internally it wraps around dd and mt. More info here:



                  https://github.com/KBNLresearch/tapeimgr



                  It also automatically determines the block size (which can be pretty tedious to do manually). Byte swapping is not supported (yet), but having read @layne-bernardo's answer I've put this on the to-do list for an upcoming release. Disclaimer:: so far I've only tested the tool with a limited number of DDS and DLT-IV tapes, as well as a virtual tape library, so use at your own risk!







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 5 '18 at 17:39









                  johanjohan

                  1512




                  1512






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480541%2fwhat-is-a-safe-way-to-dump-data-from-a-tape-drive-when-you-are-not-completely-ce%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      CARDNET

                      Boot-repair Failure: Unable to locate package grub-common:i386

                      濃尾地震