Operating System - HP-UX
1836444 Members
2517 Online
110100 Solutions
New Discussion

Re: another frecover question

 
SOLVED
Go to solution
Ron Irving
Trusted Contributor

another frecover question

I'm just chalk full of questions, aren't I?

We want to restore the contents of a tape to another local directory structure. Files exist on the tape as follows:

/dir1/dir2

We wish to put them here:

/dir1/dir3

so:

frecover -f /dev/rmt/0m -Fv0g graph /dir1/dir3

How's that?

ron
Should have been an astronaut.
8 REPLIES 8
Ron Irving
Trusted Contributor

Re: another frecover question

should I 'cd' to the directory where I want the files placed, and use the -X option??

ron
Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: another frecover question

ok...how's this?

cd /directoryofchoice
frecover -f /dev/rmt/0m -XFvg graphfile

better?

ron
Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: another frecover question

hello??

anyone????
Should have been an astronaut.
James R. Ferguson
Acclaimed Contributor
Solution

Re: another frecover question

Hi Ron:

See if this helps you. Imagine that you have a file called /tmp/dummydir/myfile on an 'fbackup' tape. You want to restore it to the /var/tmp directory. Do this:

# cd /var #...only this far
# frecover -f /dev/rmt/0m -X -x -i /tmp/dummydir/myfile

This will recover the file so that it is:

/var/tmp/dummydir/myfile

The '-F' and '-X' options are mutually exclusive. If you include both, you get "specified both X and F keys; F assumed". I may have misled you on that, in an earlier post (sorry).

Regards!

...JRF...
Ron Irving
Trusted Contributor

Re: another frecover question

Thanks James...now imagine this scenario.

we have a file:
/data01/data02/myfile.

it's been backed up just like that.

I wish to put that file here:
/data01/data03/myfile.

now:

cd /data01/data03
# frecover -f /dev/rmt/0m -F -x -i /data01/data02/myfile

God help me!!!

ron
Should have been an astronaut.
James R. Ferguson
Acclaimed Contributor

Re: another frecover question

Hi (again) Ron:

OK. In your last example, you would end up with a file "/data01/data03/data01/data02/myfile".

The best you can do is to recover the file into the principal directory you want. For instance, if I restored /tmp/dummydir/myfile into /var/tmp, I'd have /var/tmp/tmp/dummydir/myfile. If this isn't what I want, I could 'mv' /var/tmp/tmp/dummydir/myfile to /var/tmp/dummydir/myfile and remove the (then) empty /var/tmp/tmp/dummydir directory --
"messy" but true.

Regards, again!

...JRF...
Ron Irving
Trusted Contributor

Re: another frecover question

Ok James, (again.)

Here's what I did. I created a small directory tree. /tempron/backup/test
I created a few files in /tempron, and backed them up using:
fbackup -f /dev/rmt/0m -0vg /tempgraph
then I changed directory:
cd /tempron/backup/test
then:
frecover -f /dev/rmt/0m -F -x -g /tempgraph.

and you know what? I got all my files in that directory, without leading directories.

Thanks for your help James...(wish I was coming to Chicago...I'd buy you a few drinks)

regards,

RRI
Should have been an astronaut.
James R. Ferguson
Acclaimed Contributor

Re: another frecover question

Hi Ron:

I'm glad I could help. Thanks for the offer. Sorry you're not going to make Chicago.

with warm regards, Jim.

...JRF...