I'm trying to pull info from a tape backup ( i don't want to restore the data i want to back it up to a directory to archive ) I'm guessing i will use the cpio however i'm not sure of the options.
Next thing to find out is if the tar archive is in absolute format:
/dir/filename
or in relative format:
./dir/filename
or
dir/filename
If it's in relative format, you're in good shape for restoring to a directory of your choice, but if it's in absolute it's a little more difficult (not impossible) to do if you want to restore in another directory other than the format on the tape.
to check the tape type:
tar -tvf /dev/<your_tape_device_name>
If it is in relative, then:
cd /dir_of_choice
tar -xvf /dev/<your_tape_device_name>
and your in business. But, if it's in absolute, you might be able to use the pax command (that's if it is installed on your version of SCO) to change the format from absolute to relative during the restore. Very tricky to do, but it CAN be done. If you have the pax command installed, check the man pages for the syntax.
True, I have to remember this is SCO. I favor AIX and it does not have that functionality with tar, which is why they recommend to use the pax command. But, I do remember that the tar that comes default with SCO does offer that.
when i use tar -tvf /dev/tape from the directory i want to archive the files in, the reverse happens and the files in the
directory are tar'd up and written to tape
and it lists the files, does it show an "a" in front of the files listed or does it show the permissions of the files? If it shows the permissions of the files, then it's NOT archiving to tape, just listing the toc of the tape which is what the t flag is supposed to do.
you are correct the file is not being written to the tape, what it is doing is listing a file i have saved in another directory that is in the .tar format.
tar: blocksize =20
rw-r--r-- 0/3 11228905 ( then is list the directory and a random file that is in the .tar format )
Is this the primary tar device? Then modify the /etc/default/tar file to show on the last line "archive=/dev/devicename 20 0 y" like shows in archive 8 or 12 or wherever the tapes show on your version.
Directory then becomes tar tv (dash not required) archive becomes tar cv and extract becomes tar xv.
Do a tar tv on your file. if file show path ./whatever then you are absolute. then go where you want to put it and do the tar xvA as described above.
If not absolute go where you want it and do tar xv
Ed Fair
efair@atlnet.com
Any advice I give is my best judgement based on my interpretation of the facts you supply.
Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
Is this the primary tar device? Then modify the /etc/default/tar file to show on the last
line "archive=/dev/devicename 20 0 y" like shows in archive 8 or 12 or wherever the tapes show on your
version.
Directory then becomes tar tv (dash not required) archive becomes tar cv and extract becomes tar xv.
Do a tar tv on your file. if file show path ./whatever then you are absolute. then go where you want to put it and do
the tar xvA as described above.
If not absolute go where you want it and do tar xv
do a tar tv should give you the contents
tar xv /dev/tape upchucks because you don't have a file /dev/tape on the tape
so get a list and post the first 5 or so file names here and we'll work with them
or get a total listing by tar tv > tapefiles which will create a file with full details
Ed Fair
efair@atlnet.com
Any advice I give is my best judgement based on my interpretation of the facts you supply.
Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
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.