Operating System - HP-UX
1832992 Members
2667 Online
110048 Solutions
New Discussion

Re: Tar blues (Backup or backache problems)

 
Joey Raj
Occasional Advisor

Tar blues (Backup or backache problems)

have c-class running hp_ux 10.20 ,I am unable to backup a directory from my backup DAT tape which has subdirectories within it.

The syntax that I used was

tar -xvf /dev/rmt/1m uni

uni is the directory on the tape and I have a similar directory on root which is a seperate volume group on its own. Everytime I give the TAR command it just keeps reading the tape and once it stops there are no file in the directory.
4 REPLIES 4
Bill McNAMARA_1
Honored Contributor

Re: Tar blues (Backup or backache problems)

-x is for extraction

tar -xvf /dev/rmt.... dirname
won't extract from tape to dirname

use tar -tv
to view the tar
mkdir and cd then tar -xvf

Later,
Bill


It works for me (tm)
Joseph C. Denman
Honored Contributor

Re: Tar blues (Backup or backache problems)

I'm a little confused on what you are tring to do????????

To see what is on the tape.

tar tvf /dev/rmt/1m

If you are attemping to extract uni from the tape, you need to give the complete path exactly as it was captured to tape.

tar xvf /dev/rmt/1m /dir/dir/dir/uni

If you are attempting to backup uni to the tape.

cd /dir/where/uni/is
tar cvf /dev/rmt/1m ./uni

Hope this helps

...jcd...
If I had only read the instructions first??
MANOJ SRIVASTAVA
Honored Contributor

Re: Tar blues (Backup or backache problems)

Hi Joey


You question how to restore from the backed up tape . Now if you have backed up with the path then u need to give the absolute path to restore it too , ie do a tar tvf to find the way it is backed up and restore it using the same absoulte path . Incase you donr want to overwrite the exisiting stuff then u need to rename the curent files.

Manoj Srivastava
Magdi KAMAL
Respected Contributor

Re: Tar blues (Backup or backache problems)

Hi Joey,

You may first execute the command :

#tar -tf /dev/rmt/1m ? more

to see what is on tape, and then execute your command :

#tar -xvf /dev/rmt/1m uni


Attention :
You must respect the path resolution, either relative or absolute.

Magdi