Operating System - HP-UX
1834492 Members
3681 Online
110067 Solutions
New Discussion

How to recover a particular file to a temp location from the tape

 
BalaRV
Occasional Contributor

How to recover a particular file to a temp location from the tape

Hi,
I want to recover a particular file from the backup tape to a temparory location. Can anyone help me in this.
13 REPLIES 13
Luk Vandenbussche
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

What command did you use to take the backup?
melvyn burnard
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

That is like saying you want a piece of cable, without saying how long or what type.

What command/utility was used to create the tape archive?
Is it written in relative or absoulte paths if using something like tar?

My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
BalaRV
Occasional Contributor

Re: How to recover a particular file to a temp location from the tape

fbackup is the command used to take backup.
melvyn burnard
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

use frecover to recover your file, removing the leading diorectories an dallowing you to put it in the current working dircetory.
man frecover
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Luk Vandenbussche
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

The most easy way it to recover the files with sam, here you have a nice user interface.
BalaRV
Occasional Contributor

Re: How to recover a particular file to a temp location from the tape



i need to restore a perticular file to temporary location using frecover command
melvyn burnard
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

so as already stated, use either SAM to select the file and the location to put it, or use the command line, first reading the man page for frecover
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Fabio Ettore
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

Hi,

AFAIK it's not possible to recover single file to a temporary directory by frecover but only on the same path:

frecover -xXvf /dev/rmt/0m -i /

The file will be restored into the same path (overwritten).

A workaround is to recover all tape contents to a temporary directory:

mkdir /tmp/fbk
cd /tmp/fbk
frecover -xXvf /dev/rmt/0m

You will see the tree of all tape contents starting from /tmp/fbk and so you can recover single files from there.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
melvyn burnard
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

>fabio

You can in fact recover without the leading directories in frecover, see the man page for the -F option
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Peter Godron
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

Hi,
you should be able to recover a file from your backup and rename/copy the file to a different location with pax.
See:
http://docs.hp.com/en/B2355-60127/pax.1.html
melvyn burnard
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

pax reads cpio and tar archives, not fbackup archives
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Albert_31
Trusted Contributor

Re: How to recover a particular file to a temp location from the tape

Hello Bala,

Check these options of frecover, I think these are teh ones you are looking for..

frecover
-x
-N (for checking)
-X
-i
-F

regards

Albert
Bill Hassell
Honored Contributor

Re: How to recover a particular file to a temp location from the tape

frecover is the command to use. I will assume that your tape device is /dev/rmt/0m so to see the header (date/time of backup, etc):

frecover -V - -f /dev/rmt/0m

To see all the files on the tape:

frecover -I - -f /dev/rmt/0m

Note that the -I - can also be sent to a file as in:

frecover -I /var/tmp/my_index -f /dev/rmt/0m

To recover a single file to different location:

cd /var/tmp
frecover -xvF -f /dev/rmt/0m -i /etc/fstab

This assumes that you want to extract the file /etc/fstab from the tape and store it in /var/tmp/fstab. If you want to create the same directory structure but start in a different directory:

cd /var/tmp
frecover -xvX -f /dev/rmt/0m -i /etc/fstab

This recovers fstab to the directory /var/tmp/etc/fstab

The man page helps a lot in these cases.


Bill Hassell, sysadmin