Operating System - HP-UX
1833044 Members
2765 Online
110049 Solutions
New Discussion

make recovery with exclude

 
SOLVED
Go to solution
MikeL_4
Super Advisor

make recovery with exclude

I'm trying to exclude the contents of a directory from being backed up in our make_net_recovery run but I want it to still contain create the directory if a restore is necessary.

I've used both: -x exclude=/osg1/patches/* and -x exclude=/osg1/patches/*.* and when I do I receive the following pax warning errors:

WARNING: File '/osg1/patches/*.*' in archive_content list not found, or too big
for pax to handle. Skipping.

And the files within this directory are still being archived:

12 osg1/patches 40755 1141066247 1024 1
23 osg1/patches/3.5.tar.gz 100644 1130413090 724159767 707196
17 osg1/patches/temp 40755 1141056086 4096 4
42 osg1/patches/GOLDQPK11i_Plus_Mar2006_depot 40755 1141055902 12288 12
50 osg1/patches/GOLDQPK11i_Plus_Mar2006_depot/catalog 40500 1141055905 12288 12
57 osg1/patches/GOLDQPK11i_Plus_Mar2006_depot/catalog/dfiles 40500 1141055902 1024 1
62 osg1/patches/GOLDQPK11i_Plus_Mar2006_depot/catalog/dfiles/INFO 100644 1141055902 139 1
63 osg1/patches/GOLDQPK11i_Plus_Mar2006_depot/catalog/dfiles/INDEX 100644 1141055902 2327 3
62 osg1/patches/GOLDQPK11i_Plus_Mar2006_depot/catalog/dfiles/_ACL 100444 1138117249 55 1
...etc....

If I just use the exclude statement: -x exclude=/osg1/patches the directory is excluded
in the archive as I want, but if I do a restore from this image it also does not create the excluded dorectory.

What I need to do is exclude the contents of the exclude directory but if a restore is done
I need the excluded directory to be created.
6 REPLIES 6
Carlos Roberto Schimidt
Regular Advisor

Re: make recovery with exclude

Hi,

Try use only -x exclude=/osg1/patches
James R. Ferguson
Acclaimed Contributor

Re: make recovery with exclude

Hi Mike:

The shell is going to expand the "patches/*.*" into a list which isn't a simple directory or filename. I think that you need to confine your includes and excludes to a simple directory or filename.

Regards!

...JRF...
MikeL_4
Super Advisor

Re: make recovery with exclude

Again, using -x exclude=/osg1/patches works just fine, but as I stated when that image is used to restore a server the directory is also excluded and has to be created manually...

I want to be able to exclude the contents of the directory but retain the directory entry on a restore.
Bill Hassell
Honored Contributor
Solution

Re: make recovery with exclude

You wrote:

-x exclude=/osg1/patches/*
and
-x exclude=/osg1/patches/*.

cpio (or pax) could not find any files in the patches directory named * It is really easy to confuse the * (and other shell characters) as a universal mask. When tou type the -x exclude option, the shell finds the * and the tries to expand the string into matching filenames. But the match does not start after the =, it is the entire string "exclude=/osg1/patches/*" and there are no files that match that string. To prove this, type these two commands:

echo exclude=/osg1/patches/*
echo /osg1/patches/*

So you cannot use filename matching characters with the -x options. But you don't need to anyway. The pax, tar and cpio commands understand that a directory means all files and all subdirectories. So the proper syntax would be:

exclude=/osg1/patches

Now the excluded directories won't be created so you need to create them with a post-restore script.


Bill Hassell, sysadmin
Carlos Roberto Schimidt
Regular Advisor

Re: make recovery with exclude

Try use -x inc_entire=vg00 before -x exclude=/osg1/patches
MikeL_4
Super Advisor

Re: make recovery with exclude

Thanks