Bret, 

What a GREAT contribution!  KUDOS!
I use a similar procedure to gather Bare Metal Recovery cheat sheets
for all my Linux servers. (I also back them up to tape, but I keep
online backups of unique files to each server that can be used as
a setup guide in the first step of a BMR)

I am not a great programmer or I would have tried to do this myself.
I have always hacked together little shell scripts to do this.
They do the same kind of thing that yours does, only uglier.

One problem I have had is that it beats the machine
to death computing the MD5 sums and I found that there is an 
option in RPM "--nomd5", and "--noscripts" that are in the manpage
These make it *MUCH* faster, but they only report changes to the

        Time, Group, User, Links, DeviceNumbers, Perms, Size

And they don't run the %verifyscript

Could you add that as a command line option for your script?

And, I am not trying to be pushy.... But, rather than spawning 
a new instance of "rpm" for every file to check, could the 
script use the perl-RPM module to directly access the RPM 
database without having to fork a new rpm process for every
file?  Also, the program should (by default) not scan NFS or SAMBA
mounts, or the /proc, /tmp, /var/tmp directories, this would
help avoid network beating by accident.

[root@mis-unix RPMS]# rpm -Uvh rpm-perl-4.0.4-7x.18.i386.rpm
Preparing...                ###########################################
[100%]
   1:rpm-perl               ###########################################
[100%]
[root@mis-unix RPMS]# rpm -ql rpm-perl
/usr/bin/rpmprune
/usr/lib/perl5/site_perl/5.6.1/i386-linux/RPM
/usr/lib/perl5/site_perl/5.6.1/i386-linux/RPM.pm
/usr/lib/perl5/site_perl/5.6.1/i386-linux/RPM/Constants.pm
/usr/lib/perl5/site_perl/5.6.1/i386-linux/RPM/Database.pm
/usr/lib/perl5/site_perl/5.6.1/i386-linux/RPM/Error.pm
/usr/lib/perl5/site_perl/5.6.1/i386-linux/RPM/Header.pm
/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/RPM
/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/RPM/RPM.bs
/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/RPM/RPM.so
/usr/share/man/man1/rpmprune.1.gz
/usr/share/man/man3/RPM.3pm.gz
/usr/share/man/man3/RPM::Constants.3pm.gz
/usr/share/man/man3/RPM::Database.3pm.gz
/usr/share/man/man3/RPM::Error.3pm.gz
/usr/share/man/man3/RPM::Header.3pm.gz

-Ben.
        

On Tue, 2002-12-17 at 11:35, Bret Hughes wrote:
> On Tue, 2002-12-17 at 09:19, Johnathan Bailes wrote:
> > My company does not want to pay the license fees for client installs of
> > the backup software on all our boxes.
> > 
> > Many of the apps it was noted reside on the nas server and are remotely
> > mounted.  Therefore, the decision came down to only back up certain
> > files in /etc to provide for an easier re-install.
> > 
> > I got ideas of course -- passwd, shadow, nsswitch.conf, exports etc...
> > 
> > However, anybody got any more complete ideas on what should and should
> > NOT be backed up.
> > 
> > 
> 
> I wrote a perl script that ids files that are not contianed in an rpm
> package or that fail the rpm -v test.  point it to a dir, redirect the
> output to a file and you have a list of all files in the tree that can
> be edited to create a backup file list.  I have used it on three
> upgrades that involved reformating or drive replacements and it saved my
> bacon on several occations.  
> 
> I have placed the script at:
> 
> http://www.elevating.com/bret/fcf.pl
> 
> Take a look at it and let me know what you think.  Works for me.  It
> does take a while and will work the harddrive pretty well obviously.
> 
> HTH
> 
> Bret 
> 
> 
> 



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to