Marc, himself, his blogs, and you reading them.

April 21, 2006
mpo the bofh

Confession time.

I suck at system administration stuff. No, it's worse: I just hate every moment spent at doing (euh, failing at) it. I even have my own theory to justify why. It's a personality thing, and I'm sure every psy-HR-manager out there will have tons of scientific argumensts to back my claim.

The corner-stone of my theory runs around the huge amounts of utterly illogical detail-facts one need to pile up to cope with the "Arbitrary Complexity" introduced by tons of well-thinking developers that all needed this arbitrary string-value-format saved under this arbitrary property-key-name in this configfile with that arbitrary name over there in that arbitrary location. Sigh. Better not forget about the case-sensitivity on all those....

Sure GUI config tools are a big hellp ! To me however they just introduce arbitrary placed menu options triggering arbitrarily layed out dialogs...Naah best help comes from Google unless you couldn't guess that very well choosen best searchword...

Somehow there seem to be people out there that feel like a fish in this water of randomly choosen rules to comply to. The more I think about them, the less I can be surprised about any mild social disfunctions they might carry along.

Anyways, I feel often saved by piling up the 'sensible defaults' from preconfigured packages I just apt-get install and assume working from there. Not so this week however where for some reason or another I've found myself strugling with some of the above in full depth. Some of my results below, as a future reference to myself and somewhat as patch to the Internet as a whole who didn't had this indexed with the google-search-words I had in mind.

apache2 vhosts and mod-proxy

When faced with the symtoms of

  1. browser showing "Forbidden. You don't have permission to access / on this server."
  2. logs showing "client denied by server configuration: proxy:http://localhost"
there is a fair chance you are just missing out on this small section to allow the proxy-ing to happen:


        <Proxy *>
          Order deny,allow
          Allow from all
        </Proxy>

Setting up automatic mysqldumps with logrotate


# use:
# 1/ copy this to /etc/logrotate.d/mysqldumps

# 2/ in the postrotate section
#   modify password for root
#   check that uname -n doesn't produce an _ in the name for this host. --> change script with other delimitors if needed

# 3/ bootstrap with for each database you want:
#   $ export DBNAME='hetsysteem_db';
#   $ sudo touch -t `date --date="1 day ago" +"%m%d%H%M" ` /var/backups/mysqldumps/MYSQLDUMP_`uname -n`_${DBNAME}.sql

# test with
#   $ sudo logrotate -f /etc/logrotate.d/mysqldumps


/var/backups/mysqldumps/*.sql {
    daily
    rotate 5
    missingok
    compress

    postrotate
      file=$1;
      if [[ $file =~ '.*\/MYSQLDUMP_([^_]*)_(.*)\.sql' ]]; then
        DBNAME=${BASH_REMATCH[2]};
        /usr/bin/mysqldump -hlocalhost -uroot ${DBNAME} > /var/backups/mysqldumps/MYSQLDUMP_`uname -n`_${DBNAME}.sql
      fi
    endscript
}
# Posted by mpo at 10:01 PM | TrackBack
Comments

Now you know what we sysadmins suffer. ;-)
And very often it is impossible to convince programmers that their marvelously easy configuration is a giant pain in the butt if it means hand-configuring 100 computers.

With regard to the well chosen Google search words: skill improves after years of sysadmin work and hours of hunting down random errors that turn out to be due to a typo in the configuration. :-)

Posted by: helma at April 21, 2006 11:13 PM

I take it BOFH stands for BAD Operator From Hell in your case?

Posted by: Patrick Ahles at April 25, 2006 01:40 PM
Post a comment









Remember personal info?





Please enter the security code you see here