Re: tar and the braindead man
---Anthony Landreneau <firstname.lastname@example.org> wrote:
> Ok Kenneth,
> I must be missing something here, other than my mind of course.
> the requirment:
> I have a tape with a tar file on it, lets call it thefile.tar . I
> make two copies of that file, back on two other tapes. So I will have
> three tapes with three identical copies of this tar file.
> I got thefile.tar off of the original tape using
> tar -xv ./thefile.tar -C /usr/thedirectorystore
Ok your tape has a tar image on it. NOT a file. Tar files are a
collection of files (sortof like a .zip file is, only not compressed).
A tar file is an arcive. Now streaming tapes don't have file systems
on them (ususally). So when you use tar to archive a collection of
files (say the contents of a given directory) you can create a tar
image IN A FILE on your disk, or you can write the image to the tape.
Now when you want to extract the image from the tape (thereby
re-creating the directory on the disk) the command is
tar -xvf /dev/st0
which will extract the directory and all files to the disk. You must
give an arguement to tell tar where on the disk to place the files.
It can place them at the original locations (which you don't want),
into the current directory, or a specific directory. I don't have the
tar manual in front of me so I can't help here.
> The tar file is now on the hard drive. Now I want to put it back
> tape, gee, simple minded me thought
> tar -cv ./thefile.tar -C /usr/thedirectorystore
Once you have extracted the directory back to the disk, to write it
out to a new tape just
tar -cvf /dev/st0 /the_extracted_directory
The -xf option specifies the SOURCE for extraction
the -cf option specifies the DESTINATION for creation.
Note that if you really had a tar file on your disk, then to extract
the directory (into the current directory where the .tar file is) the
tar -xvf tarfile.tar
which assumes that the current directory has a file named tarfile.tar
and the extracted directory structure will be created in the current
> and bingo, but that doesn't seems to be happening. Any ideas on how
> complete this task?
> Thanks again,
> >Close, but no cigar.
> >syntax is:
> >tar -cvf /dev/tapedevice /usr/thedirectory.
> >To make a full backup I did:
> >tar -cvf /dev/st0 / --exclude /dev --exclude /proc
> >(my tape drive is a scsi rdat on /dev/st0) This command backed up
> >everything, except the dev and proc directories. (I had some BAD
> >things happen trying to access the devices as files, and you don't
> >need to backup the /proc directory as it does NOT exist on the
> >Don't leave your cd rom mounted for this or it will get backed up
> >also, why waste 650MB of tape for something that can't be trashed?!
> > Got what I thought was a simple problem. I have a 2GB DAT
> >drive, a
> >directory that I want to backup to that tape drive. Seems simple
> >but I can't seem to get it to work. I thought the command was:
> >tar -cvf thetarfile.tar /usr/thedirectory
> >But it isn't working. Now I have created a tar file on the hard
> >thought it would be just as easy to move the file to tape, but I
> >figure that out either. Tried mounting the tape drive and the
> >mocks me openly. Any and all help would be apprciated!
> >DO YOU YAHOO!?
> >Get your free @yahoo.com address at http://mail.yahoo.com
> >Unsubscribe? mail -s unsubscribe
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com