Operating System - HP-UX
1834926 Members
2442 Online
110071 Solutions
New Discussion

find . AND -prune commands

 
JMB_PHP
Advisor

find . AND -prune commands

For backup we copy the ./dbms/* directories to ./buds and then use a find . - print to cpio the entire file system to tape. I need to exclude the ./buds directory. Will the following command duplicate the output of the simple find . - print command (exluding the ./buds directory?

cd / ; find . -path ./buds -prune -o -print

Here's the directory structure:

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 143360 63724 74715 46% /
/dev/vg00/lvol1 83733 38537 36822 51% /stand
/dev/vg00/lvol8 1572864 1073336 468698 70% /var
/dev/vg00/lvol7 1261568 649236 574148 53% /usr
/dev/vg00/u1 512000 211839 281419 43% /u1
/dev/vg00/lvol4 1048576 12937 971132 1% /tmp
/dev/vg00/lvol6 557056 270983 268225 50% /opt
/dev/vg00/lvol5 20480 1113 18163 6% /home
/dev/vg04/dbmsdsk4 8888320 2597302 6097654 30% /dbms/disk4
/dev/vg03/dbmsdsk3 8888320 3891986 4840222 45% /dbms/disk3
/dev/vg02/dbmsdsk2 8888320 3650734 5074622 42% /dbms/disk2
/dev/vg01/dbms 17776640 12907528 4793100 73% /buds

5 REPLIES 5
Peter Nikitka
Honored Contributor

Re: find . AND -prune commands

Hi,

your command looks okay - but for backing up a whole system, an ignite backup is much more valuable than a simple cpio tape.

mfG Peter

The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
JMB_PHP
Advisor

Re: find . AND -prune commands

Thanks, we use cpio so we can restore individual files on an as needed basis.

I was under the impression that ignite was used for HPUX system files and settings to restore basic configurations (LAN, printers, etc..)
Sandman!
Honored Contributor

Re: find . AND -prune commands

The ignite-based recovery tape can also be used to recover individual files. By default it'll copy only vg00 unless you specify explicitly.
Michael Steele_2
Honored Contributor

Re: find . AND -prune commands

Although ignite defaults to a 'pax' backup utiltiy you can also use tar. And tar will allow individual file restorations.

Position after the first ignite tape record (bootlif).

# mt -t /dev/rmt/0mn fsf 1

Note the no rewind option 0mn.

# tar -xvf /dev/rmt/0m filename

Support Fatherhood - Stop Family Law
James R. Ferguson
Acclaimed Contributor

Re: find . AND -prune commands

John:

Ignite is the preferred method for creating recovery images of vg00. That said, it is not a generalized backup tool.

If you have a 'make_tape_recovery' tape from Ignite, and want to restore an individual file (on a PA-RISC server), you can do:

# mt -t /dev/rmt/0mn fsf 1
# tar -xvf /dev/rmt/0m filename

Ignite uses 'pax' in reality to create the archive on the tape.

Regards!

...JRF...