Operating System - HP-UX
1753681 Members
5697 Online
108799 Solutions
New Discussion юеВ

frecover just the files in a subdirectory

 
SOLVED
Go to solution
Ed Hon
Regular Advisor

frecover just the files in a subdirectory

What should the frecover command string be to restore only the files in a given subdirectory (not recursive) to a local directory?
7 REPLIES 7
Vincenzo Restuccia
Honored Contributor

Re: frecover just the files in a subdirectory

/usr/sbin/frecover -I path [-vy] [-f device]
Sachin Patel
Honored Contributor

Re: frecover just the files in a subdirectory

To recover files to original location:
# frecover -f /dev/rmt/0m -xov -i /source_directory

To recover files relative to the current working directory:
# cd /destination_directory
# frecover -f /dev/rmt/0m -xXov -i /source_directory

To recover all files under source directory to the present directory (all paths on tape will be ignored - leaving a flat directory structure):
# cd /destination_directory
# frecover -f /dev/rmt/0m -xFov -i /source_directory

Sachin
Is photography a hobby or another way to spend $
Rob Smith
Respected Contributor

Re: frecover just the files in a subdirectory

Hi, if you use the -X option it will create and restore the directory under the current directory. If the -F option is specified it will extract the requested files and place them in the current directory but won't create the directory structure. You use these options along with the -x option. If you use both -X and -F together -F will override. Hope this helps.

Rob
Learn the rules so you can break them properly.
James R. Ferguson
Acclaimed Contributor
Solution

Re: frecover just the files in a subdirectory

Hi Ed:

Create a graph file (e.g. /tmp/mygraph) with inclujde flags for your files. For example:

i /usr/local/bin/file1
i /usr/local/bin/file2

Then:

# frecover -F -x -g /tmp/mygraph -o -v -f /dev/rmt/0m

...would recover those files from a tape (0m) irrespective of age. The key flag is the '-F' one.

...JRF...
Shahul
Esteemed Contributor

Re: frecover just the files in a subdirectory


Hi

I have not done this. But I think this procedure will help U. U can create a graph file and restore ur particular directories. Do like this.

Go to ur local directory say /home/jak

#cd /home/jak
Create a text file here and add lines like this,

i
e

i for include and e for exclude

Then

#frecover -X -f /dev/rmt/0m -g /home/jak/graphfile

-X for restoring to ur current local directory.

Best of luck

Shahul
Ed Hon
Regular Advisor

Re: frecover just the files in a subdirectory

Thanks for all the responses. Well, there seems to be no frecover option to do what I want to do easily, that is recover all the files in a directory to my current working directory and without traversing the directory structure. It seems I have to create a detailed graph of either all the filenames to include or all the subdirectory names to exclude.
bhoopathi_1
Frequent Advisor

Re: frecover just the files in a subdirectory

Yes Ed, there is no specific option, u need to create a graph file for including and excluding of directories. However -F option serves ur purpose upto some extent.... but in reverse order(Recover files without recovering leading directories).....

Cheers...
Satish.