Operating System - HP-UX
1834780 Members
2595 Online
110070 Solutions
New Discussion

Re: frecover in differents paths

 
SOLVED
Go to solution
Verónica Muñoz Segovia
Frequent Advisor

frecover in differents paths

Hi all!
I'm going to reorganize all the filesystems in an autoRAID 12h. I'm going to delete the actual configuration (/dbdata, /respaldo) and I'm going to create /u01, /u02 and /b01. Before to delete everything I going to do a fbackup (with the all paths), but I would like to know if there is any possibility to restore just once, because some files that were on /dbdata I will restore them on /u01 and others in /u02, and I thing I will need to restore twice the same tape with frecover -f /dev/rmt/0m -xFv i /dbdata/...... Am I wrong? or anybody in just once time have ever restore a tape through multiple filesystems?

Regards,

Veronica
Always is important to know the opinion of other people with or without experience
9 REPLIES 9
Bruce Regittko_1
Esteemed Contributor

Re: frecover in differents paths

Hi,

I'm not sure that you will want the -F option. This strips off the entire path of the file and places the file in the current directory. For example, say you have /dbdata/DIR-A/file1 backed up and you execute your frecover command in the /u01 directory. You will end up with /u01/file1 and lose the DIR-A directory.

You may want to use the -X option instead from /u01, which will give you /u01/dbdata/DIR-A/file1. You can then move DIR-A to /u01 with mv and then rmdir /u01/dbdata.

--Bruce
www.stratech.com/training
Verónica Muñoz Segovia
Frequent Advisor

Re: frecover in differents paths

Thanks for your answer. I could use either -F or -X, I don't care about the second path, the point is that I only will have three hours to do the restore, and I want to loose the less time because we have just 24 hours to do a list of activities and after that we will need to free the server to production, that's my mayor issue the time, that's why I want to know if it's possible to in just one time could recover the tape in differents paths.

Thanks a lot.
Always is important to know the opinion of other people with or without experience
Bruce Regittko_1
Esteemed Contributor

Re: frecover in differents paths

Hi again,

I don't think you can restore into two different directories with one frecover command. The one thing you could do is put the multiple frecover commands into a shell script so that the second one begins as soon as the first one completes and so on. Not much time savings but better than nothing.

--Bruce
www.stratech.com/training
Verónica Muñoz Segovia
Frequent Advisor

Re: frecover in differents paths

Thanks again, you're right I cannot do that but that's a good idea to put the two fbackup in a script.

Regards,

Veronica
Always is important to know the opinion of other people with or without experience
Rodney Hills
Honored Contributor

Re: frecover in differents paths

Let's say you have have directories /a/data and /a/prog backed up on a fbackup tape. And you want /a/data put on /u01 and /a/prog put on /u02 in one pass, I believe if you create

mkdir -p /u02/prog
ln -s /u02/prog /u01/a/prog
cd /u01
frecover -xXf /dev/tape -I /a

frecover will complain during the restore that /u01/a/prog exists and is not a directory, but it will still restore the items onto /u02.


There be dragons...
Verónica Muñoz Segovia
Frequent Advisor

Re: frecover in differents paths

I don't know if I'm so tired trying to find a solution, but I think don't understand very well.

For example, I had backed up the directory /dbdata and that directory have file1, file2, file3, file4, file5, then when I did the reestructuration I will restore them as follow /u01/file1, /u02/file2, /u01/file3, /u01,file4, /u02/file5. How can I create a link that have reference with the u01 filesystem?

I appreciated your help because I have even headache.

Thanks in advance
Always is important to know the opinion of other people with or without experience

Re: frecover in differents paths

Hi,

You can try this:

# cd /u01
# frecover -xovFf /dev/rmt/0m -i /dbdata
#cd /u02
# frecover -xovFf /dev/rmt/0m -i /respaldo

Thanks
Rodney Hills
Honored Contributor
Solution

Re: frecover in differents paths

Unfortunately my first solution only works with whole directories, not individual files.

If you have access to the backup process, maybe you could do the following-

cd /dbdata
mkdir group1 group2
mv file1 file3 file5 group1
mv file2 file4 group2
fbackup -f /dev/tape -i /dbdata
# following fbackup, you can move files back

Then use my previous suggestion as a way to restore to two different file systems. You then need to do "mv" to put the final files in their proper place in the subdirectory u01 or u02.

Apart from this, I don't think you can have frecover to individual files (would be a nice feature though :) ). Maybe Interex could recommend an option to the graph file, that if a path follows the "i /dir1/dir2/file" on the same line, that that should be the placement for the specified file or directory.

Good Luck
There be dragons...
Verónica Muñoz Segovia
Frequent Advisor

Re: frecover in differents paths

Thanks for your help, the option to restore directories is very useful, but as you said unfortunately I want to move files, but again thank you very very much for your help.
Always is important to know the opinion of other people with or without experience