home *** CD-ROM | disk | FTP | other *** search
/ Micro R&D 1 / MicroRD-CD-ROM-Vol1-1994.iso / disktools / bakup / scsitape.lha / doctape.doc < prev    next >
Text File  |  1992-08-03  |  4KB  |  125 lines

  1.  
  2.                 TAPE-HANDLER
  3.  
  4.               By Matthew Dillon
  5.  
  6.     This distribution contains a SCSI TAPE handler (uses SCSI-DIRECT).
  7.  
  8.  
  9. (I) STARTING UP THE HANDLER
  10.  
  11.     This handler must NOT be mounted.  To start the handler, run it in the
  12.     background.  For example, if your tape drive is on "scsi.device" unit 4
  13.     and you wanted to call it TAPE: then you would say:
  14.  
  15.     run <nil: >nil: l:tape-handler TAPE -Dscsi.device -U4
  16.  
  17.     Note that the handler defaults to 'scsi.device' so you really only
  18.     need to specify the unit number if that is indeed your scsi device:
  19.  
  20.     run <nil: >nil: l:tape-handler TAPE -U4
  21.  
  22. (II) READING AND WRITING THE TAPE
  23.  
  24.     Being a handler you may read and write the tape through standard DOS
  25.     redirection or via an archive program such as Tar, or you can use Copy.
  26.     You should beware that, when not using an archiver, any files copied to
  27.     tape will be zero padded to the tape's sector size which is normally
  28.     512 bytes.
  29.  
  30.     The notation for accessing the TAPE: device works as follows.  You may
  31.     specify almost any combination of flags and an optional buffer size
  32.     (256K is used if none specified).  There are NO spaces in the
  33.     specification.
  34.  
  35.     TAPE:<flags><buffer_size>
  36.  
  37.     r    - rewind tape before accessing
  38.     a    - append to tape
  39.     e    - short erase (may not be supported on tape drive)
  40.     E    - FULL erase  (should be supported on all tape drives)
  41.  
  42.     The following example will copy a huge lharc file to the beginning of
  43.     the tape using a 1MB ram buffer.  A rewind before writing effectively
  44.     erases the tape.  Note that I do not specify the 'r'ewind flag for
  45.     remaining operations.
  46.  
  47.     1> copy huge1.lzh tape:r1024        ; write to tape
  48.     1> copy huge2.lzh tape:1024
  49.     1> copy huge3.lzh tape:1024
  50.  
  51.     1> copy tape:r1024 huge1.lzh        ; read back from tape
  52.     1> copy tape:1024 huge2.lzh
  53.     1> copy tape:1024 huge3.lzh
  54.  
  55.     If you do not specify rewind or append then tape operations begin at
  56.     the tape's current position.
  57.  
  58. (III) APPENDING TO THE TAPE
  59.  
  60.     The tape-handler implements an append flag that allows you to position
  61.     the tape head to the end of currently existing data before beginning a
  62.     write.  In order to get around the brain-dead Commodore tape drive I've
  63.     implemented Append mode by fully rewinding the tape and the skipping
  64.     filemarks until I get a BLANK status.  This should work on all known
  65.     tape drives.
  66.  
  67.     To append to a tape the tape should already contain some data.  Note
  68.     that you only have to specify the 'a' flag the first time.  After that,
  69.     the tape head will be positioned properly (unless you rewind it or
  70.     something).
  71.  
  72.     1> copy huge4.lzh tape:a1024
  73.     1> copy huge5.lzh tape:1024
  74.  
  75. (IV) Manual Tape Operations
  76.  
  77.     You can run manual tape operations by simply openning TAPE: with the
  78.     appropriate flags and closing it again without reading or writing
  79.     data.  For example:
  80.  
  81.     1> echo >tape:r1    rewind the tape
  82.     1> echo >tape:a1    position tape at end
  83.     1> echo >tape:E1    erase entire tape
  84.  
  85. (V) GnuTar
  86.  
  87.     GnuTar is included in this distribution and is an excellent program for
  88.     making backups and tape archives.  Note that I am specifying the 'r'
  89.     flag and a 1MB buffer in my examples.  You will not necessarily wish to
  90.     do this depending on whether you are creating a new tape, appending to
  91.     a tape, etc...
  92.  
  93.     (a) archive a directory to tape
  94.  
  95.     1> gnutar cvf tape:r1024 directory1 directory2 ... directoryN
  96.  
  97.     (b) check a directory against a tape archive
  98.  
  99.     1> gnutar +verbose +diff +file tape:r1024 directory1 directory2 ...
  100.  
  101.     (c) extract a directory from the tape (note, will overwrite directory
  102.     if it already exists)
  103.  
  104.     1> gnutar xvf tape:r1024
  105.  
  106.     There are many other options to GnuTar.  Note that the compress options
  107.     are not available at this time.  I do not have a manual page for GnuTar
  108.     but typing 'gnutar +help' should give you enough information at least
  109.     for basic features.
  110.  
  111. (VI) FEATURES OF TAPE-HANDLER
  112.  
  113.     My tape-handler implements fully asynchronous double-buffered read and
  114.     write operations.  If you have disk/tape drives which support
  115.     reselection then the handler will be able to operate on the tape
  116.     concurrently with disk accesses meaning that an archiver such as
  117.     Tar will not 'freeze' while tape operations are in progress.
  118.  
  119.     To take the greatest advantage of this feature you should specify as
  120.     large a buffer as possible.  Anywhere from 500K to 2MB will yield
  121.     reasonable throughput.
  122.  
  123.  
  124.  
  125.