Hi all, our servers are being backed up via tape using the tar -cvf command. What I need to know is how can I retreive a file from tape. I tried tar -xvf /dev/ht0 /etc/motd as a test but it would just hang, all suggestions would be helpful.
thanks,
rg
Just hang as in it didn't run through the tape or hang as in did nothing useful?
Try "tar tvf /dev/ht0 | more"
If that lists files, note how they are listed- if for example, they begin ./, you may need to do
tar -xvf /dev/ht0 ./etc/motd
Or if they list as //, then
tar -xvf /dev/ht0 //etc/motd
would be what you want (though I din't think Linux tar had these problems- those are typical of regular old Unix tar's behaviour).
Or, it may just be that /etc/motd is not on the tape even though you think it should be- if that's the case, tar will keep on reading until it hits eot, which might look like "hung" on a big backup.
But if you mean hang as in really doing nothing, are yu sure this device is working?
This is the output from tar tvf /dev/ht0 -rw-r--r-- root/root 2147483647 2001-12-27 00:21:02 backup.tar
So it looks like all the filsystems being backed up are in this backup.tar file. Now if I wanted to get just one file from this file, would
tar xvf /dev/ht0 /backup.tar/etc/motd work?
Yes 'tar xvf /dev/ht0 /backup.tar/etc/motd' should extract the single file /etc/motd from the /backup.tar archive on /dev/ht0. I.e. you use the full path to the file within the archive not just the archive name.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.