On Wed, 3 Jul 2002, Tibbetts, Ric wrote:

> On Wed, 3 Jul 2002, Tibbetts, Ric wrote:
> 
> > 
> > >ok...now you've really got my curiosity peeked. once you get the files 
> > >"on" the tape, how in the world does one browse, find, and then get the 
> > >file(s) off the tape? I've never done this before, but am truely
> facinated 
> > >by this. 
> > 
> > Simple.
> > If you put 'em on there with "tar", take 'em off with "tar".
> > To get a listing of them:
> > 
> > tar -tvf /dev/st0 > tape_list.tar (would output the contents to a file)
> > Want one off?
> > tar -xvf /dev/st0 <path/filename>
> > 
> > Want to get really trick, you can compress the files when you write them
> to
> > tape with tar:
> > 
> > tar -czvf /dev/st0 <files to be backed up>
> > 
> > To get those off:
> > 
> > tar -zxvf /dev/st0 <filespec>
> > 
> > The "z" in tar will compress/uncompress them on the fly. There are far
> > better utilities for doing backups than tar. But in a pinch, it works.
> Let's
> > not forget that "tar" is short for "Tape ARchive"
> > In fact, tar should by default use whatever your default tape drive is.
> > (works that way on AIX, Solaris, & HP-UX anyway)> You just type:  tar -xv
> > <files to back up> If you leave off the "f", it defaults to the first tape
> > drive. The "f" flag is actually to designate a "f"ile name for the archive
> > other than tape. I haven't tried this on Linux. Maybe I'll check mine when
> I
> > get home.. ;)
> > 
> > Have fun!
> > 
> > Ric
> > 
> > Now the fun part: This is like a lottery: Will this actually post or not.
> I
> > haven't had any luck lately. I've almost given up trying.
> 
> Ric,
> 
> thank you SO much for that awesome information. I can now see what is on 
> the tape now by writing the contents to a file. however when I attempt to 
> extract a specific file from the tape is tells me that the listed file is 
> not found in the archive.
> 
> ======error message=======
> [root@tapeserv root]# tar -xvf /dev/st0 /home/mdw1982/.mc/ini
> tar: /home/mdw1982/.mc/ini: Not found in archive
> tar: Error exit delayed from previous errors
> ====== end error message =======
> 
> 
> Try dropping the leading slash from the filespec:
> 
> tar -xvf /dev/st0 home/mdw<whatever>/<somefile>
> 
> Just watch where you're sitting when you do that. I think if you check the
> listing you made with 'tar -tvf', you'll notice the leading slash is not
> there. Tar does that so you can restore them anywhere. If the leading slash
> is still on, then the file will only restore to it's original location.
> I usually have a /Data/Restore filesystem for doing restores. I get them off
> tape to that directory, then put them in place. It's a hassle, but I've
> hammered home directories by dropping them straight in. (turned a whole home
> directory into 0 length files... oops!).
> 
> Cheers!
>       Ric

Ric,

Thanks...that did the trick. Now all I've got to do is figure out just how 
to erase the tape before backing up to it. Or, does that happen 
automagically when tar begins to write to the device? 

-- 
daRmaTTeR

R L U: #186492
When ever people annoy me I remember, "Vengence is mine saith the Lord."
My prayer is, "...here am I Lord...send me!"


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to