AIX 5.1 mksysb…reliable-backup?

I hate to use the word ‘hate’ but I really ‘hate’ AIX.  Now it may be that I am just not a true expert and I don’t know enough about the OS to be fair, but that is my stance.  I have never had as much difficulty with any other OS as with AIX, any flavor.  In any event, I have to manage these system on a regular basis and one of the tasks I usually setup on the system in an automated backup to the often-times included internal tape drive (usually 4mm).  I had a system crash last week and I had to restore it from a rescue boot CD, which worked quite well, aside from the 14 times it took me to get the RS6000 to actually boot from the CD.   So of course it lost a majority of it’s settings, all of my automation scripts being the topic for today.  I must admit that it is quite likely that I caused the issue in the first place by trying to mirror 3 drives in the rootvg, as a test of course, and it just never seemed to be the same after.  Even following a complete removal of the 3rd hdisk and all of its pointers… something just wasn’t right, until one morning it was just completely hosed.  So anyway, one of my complaints with AIX is that even within the same parent release levels; i.e. v5.1, v5.2, v5.3, the commands to not translate well if at all across them?  I have been wondering why I have not seen an email reporting on this systems backups… well of course I had a case incompatibility issue in my script that I took from a v5.2 system to use on this v5.1 system.  I have the tested and functional script below for use on an AIX v5.1 RS6000 server 🙂

typeset -r datetime=`date`
typeset -r date=`date +%Y%m%d`
typeset logfile=”/opt/proserve/logs/backup.$date.log”
typeset maillog=”/opt/proserve/logs/maillog.$date.log”
typeset errlog=”/opt/proserve/logs/errlog.$date.log”
. /opt/proserve/clientconfig
echo “\n” > $logfile
echo “===============================================================”
echo ”                       MKSYSB and System Report                     ”
echo ”                         for activities run                     ”
echo ”                     $datetime ”
echo “===============================================================”
echo “\nClient Information Section”
echo “——————————————-”
echo “\nCustomer – $clientname ”
echo “\nSystem status – `uptime`\n”
echo “Users currently logged into this system:”
echo “***NOTE*** – Any data changed on this system by users”
echo ”             currently logged in will not be backed up!”
echo “\n===============================================================”
echo “\nCurrent System Error Report:”
echo “\n===============================================================”
echo “\nCurrent Filesystem Space:”
df -k
echo “\n===============================================================”
echo “\nSystem Information:”
echo “\n===============================================================”
echo “\nCurrent tape information:\n”
tctl status
echo “\nRewinding tape……….”
tctl rewind
echo “\nBeginning system backup @ $datetime\n”
/usr/bin/mksysb  ‘-e’  ‘-v’ ‘-i’ ‘-X’  /dev/rmt0
echo “Backup ended at `date`”
} 1>$logfile 2>$errlog
cat $logfile > $maillog
echo “\n===============================================================” >> $maillog
echo “\nAdditional messages reported during backup:” >> $maillog
cat $errlog >> $maillog
mail -s “System Backup and Status Report” -r $email_list < $maillog

The issue was that v5.1 didn’t like the ‘V’ that v5.2 uses… I just changed the ‘V’ to a ‘v’ and that worked fine… Guess I should take a look at the log files before assuming that something is compatible.  Ya know I just had a thought, I wonder if my hatred for AIX is actually displaced and should be focused on ksh…  I am a bash lover without a doubt… korn may not be for me 🙂


, , , , , , , ,

  1. #1 by gmconklin on June 21, 2010 - 11:14 am

    good point Aaron… I am just a whining baby 🙂 Another good thing is that I am NOT a carpenter… I would have likely cut off some appendage by now !!!

  2. #2 by Aaron on June 21, 2010 - 11:01 am

    Yeah kron, but a good carpenter never blames his tools!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: