Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

backup systems. (Use Amanda!!)



Derek Atkins <warlord at MIT.EDU> writes:
> That's not the question at all.  I want to save configuration
> files.  I don't want to save, e.g. /lib/libc.so

The way I do this in my backup Perl script (which is probably a week away from 
sharing, because I need to clean some things up that I won't have time for 
until after my J2EE class) does this is: 

-I read the output of a find command.
-I search through a list of must-include regexps.
-If not in there, I read through a list of must-not-include regexps.
-If not in there, then I see if it is a text file (using if(-T $file)) under a 
size limit (currently 30K), and back it up if it is.
-If it's not a text file, then I see if it is a binary file (using if(-B 
$file)) under a size limit (currently 10K), and back it up if it is.

Using the regexps, I make sure home directories, log files, and mail spools 
etc are backed up regardless of size.  But the main test (text files under 
30K) catches all the good config files, as long as they are not on the 
must-not-include list.

If you're interested, I can post it in its current state, or you can wait til 
next week when it will be able to read config files, have more overrrides, 
and make esspresso.  You should do the backup before making the espresso 
though, just in case someone bumps into your computer and spills it.


-------------------------------------------------------------------
DDDD   David Kramer                           http://thekramers.net
DK KD  "The most likely way for the world to be destroyed, most
DKK D  experts agree, is by accident. That's where we come in; 
DK KD  we're computer professionals. We cause accidents." 
DDDD                                          -Nathaniel Borenstein 




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org