Operating System - HP-UX
1851498 Members
2605 Online
104059 Solutions
New Discussion

frecover dir to another dir

 
SOLVED
Go to solution
M.J. van der Meer
Frequent Advisor

frecover dir to another dir

Hi you all,

I want to frecover one dir from tape to another directory on disk; the rest of the dirs on tape must go to the same dirs on disk what is exactly the command to do so and can i do it in one command?

Tenx
Martijn
3 REPLIES 3
Rodney Hills
Honored Contributor
Solution

Re: frecover dir to another dir

The -X option of frecover will recover all files relative to your current working directory.

But if you want to restore all files to the same place, except for one directory, then do the following
1) Create the new directory you will be restoring into.
2) Delete the existing directory of what you will be moving.
3) Create a symbolic link at the directory path of the directory you want to move pointing to the new directory created above.
4) Run your restore as normal.

Example-
mkdir /mynewdirectory
rm -R /u1/olddirectory
ln -s /mynewdirectory /u1/olddirectory
frecover -x -i / -f /dev/rmt/0m

Because the symbolic link /u1/olddirectory exists and is newer than the directory /u1/olddirectory is on tape, frecover will leave it alone and restore the files to /mynewdirectory.
There be dragons...
Stefan Farrelly
Honored Contributor

Re: frecover dir to another dir


I dont think you can do it in one command.

frecover -x recovers to same dirs as backed up from, -X to the current dir. Looks like you will need 2 passes.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Thierry Poels_1
Honored Contributor

Re: frecover dir to another dir

Hi,
if you want to restore a tree to another subdir you can always fake the previous path by creating a symbol link for the original path and let it refer to the subdir you want.
I use the same trick for snapshot backups, where the backup is taken from another directory than the original.
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.