System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Reg : Backup restore using tar

Mastan
Frequent Advisor

Reg : Backup restore using tar

Hi,

We have HP LTO2 Universal Cartridge, inside the cartridge backup1, backup2, backup3 directories are there.

Now I have to restore backup1 directory only, how can I restore using tar command.

Please guide me.

Regards,
Masthan.
4 REPLIES
Patrick Wallek
Honored Contributor

Re: Reg : Backup restore using tar

Are the /backup* directories stored as '/backup1', './backup1' or 'backup1'? It makes a difference in how you restore.

To find out you could do a:

tar -tvf /dev/rmt/?m

(where the ?m is your appropriate tape device)

If the 'tar -t' show 'backup1' (no leading '/' or './') then you can do:


tar -xvf /dev/rmt/?m backup1
Mastan
Frequent Advisor

Re: Reg : Backup restore using tar

Hi Patrick Wallek,

Thanks for the reply.

Inside the Cartridge we have cold_bkp_01112010, cold_bkp_02112010, arc10, arc11 & arc12 files are there.

Old path for cold_bkp_01112010 (/prod8/backup/ cold_bkp_01112010).

We have taken cold_bkp_01112010 backup and deleted above logical & physical path in hp-ux server and storage.

Now I have to restore cold_bkp_01112010 in different path (/prod4/backup)

Please suggest the same.

Regards,
Mastan.
Steven Schweda
Honored Contributor

Re: Reg : Backup restore using tar

> Inside the Cartridge we have [...]

How do you know what's on the tape? How was
the tape made, "tar" or some other program?
Can you read what's on the tape? How? If it
is a "tar" tape, then actual output from a
"tar tfv" command could be useful.

As usual, showing actual commands with their
actual output can be more helpful than vague
descriptions or interpretations. Often nice
to know, for example:

uname -a
Dennis Handly
Acclaimed Contributor

Re: Reg : Backup restore using tar

>I have to restore cold_bkp_01112010 in different path (/prod4/backup)

If the file was written with an absolute path, you'll need pax's -s to rename it. (Or gnu tar.)