Re: Mksysb Script
- From: David Zarnoch <davezarn@xxxxxxxxxxx>
- Date: Thu, 14 Sep 2006 10:46:22 +0000
I have this script:
#!/bin/sh
#
#
# Purpose - mksysb script
# Author - Dave Zarnoch
# Date - 05/12/2005
# Modified -
# Modified -
# SRC - provtsm:/home/root/mksysb.sh
#
# Variables
#
DATE=$(date "+%a %b %e")
DRIVE=/dev/rmt0
log=/var/adm/mksysb.log
$loghostname=`hostname`
MAILERS='davezarn@xxxxxxxxxxx'
#
#Main
#
echo `date`: Starting mksysb on $hostname >>$log
echo >>$log
mksysb -i -e $DRIVE -V >>$log 2>>$log
RC1=$?
if [ $RC1 -eq 0 ]; then
echo "\t"mksysb RC is $RC1 >>$log
else
echo "\t"mksysb RC is $RC1 >>$log
echo "\t"Error running mksysb of rootvg. Aborting! >>$log
mail -s "mksysb backup errors running $hostname mksysb.sh script" $MAILERS <$log
echo `date`: EXITING script >>$log
tctl -f $DRIVE offline
exit 15
fi
tctl -f $DRIVE offline
echo `date`: Finished mksysb on $hostname >>$log
mail -s "mksysb completed successfully on $hostname" $MAILERS <$log
I then put it into cron:
0 5 * * 1-5 /usr/bin/mksysb.sh >/dev/null 2>&1
Hope this helps.
Dave Zarnoch
davezarn@xxxxxxxxxxx
From: "Vincent D'Antonio" <dantoniov@xxxxxxxxx>
Reply-To: IBM AIX Discussion List <aix-l@xxxxxxxxxxxxx>
To: aix-l@xxxxxxxxxxxxx
Subject: Mksysb Script
Date: Wed, 13 Sep 2006 16:18:08 -0400
MIME-Version: 1.0
Received: from Princeton.EDU ([128.112.130.38]) by bay0-mc1-f19.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Wed, 13 Sep 2006 13:24:12 -0700
Received: from smtpserver1.Princeton.EDU (smtpserver1.Princeton.EDU [128.112.129.65])by Princeton.EDU (8.13.8/8.13.8) with ESMTP id k8DKKGbX011978;Wed, 13 Sep 2006 16:20:16 -0400 (EDT)
Received: from lists.Princeton.EDU (listsv440.Princeton.EDU [128.112.131.10])by smtpserver1.Princeton.EDU (8.12.9/8.12.9) with ESMTP id k8DKAEcq007158;Wed, 13 Sep 2006 16:18:39 -0400 (EDT)
Received: by LISTS.PRINCETON.EDU (LISTSERV-TCP/IP release 14.5) with spool id 13405285 for aix-l@xxxxxxxxxxxxxxxxxxx; Wed, 13 Sep 2006 16:18:39 -0400
Received: from Princeton.EDU (postoffice01.Princeton.EDU [128.112.129.75]) by lists.Princeton.EDU (8.13.1/8.13.1) with ESMTP id k8DKIdQC019859 for <aix-l@xxxxxxxxxxxxxxxxxxx>; Wed, 13 Sep 2006 16:18:39 -0400 (EDT)
Received: from Princeton.EDU (postoffice01.Princeton.EDU [128.112.129.75]) by Princeton.EDU (8.13.8/8.13.8) with ESMTP id k8DKIdvI014457 for <aix-l@xxxxxxxxxxxxxxxxxxx>; Wed, 13 Sep 2006 16:18:39 -0400 (EDT)
Received: from emfw2.Princeton.EDU (emfw2.Princeton.EDU [128.112.128.96]) by Princeton.EDU (8.13.8/8.13.8) with ESMTP id k8DKIZCT014416 for <aix-l@xxxxxxxxxxxxx>; Wed, 13 Sep 2006 16:18:36 -0400 (EDT)
Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.239]) by emfw2.Princeton.EDU (Spam Firewall) with ESMTP id 3B1D435B1A for <aix-l@xxxxxxxxxxxxx>; Wed, 13 Sep 2006 16:18:09 -0400 (EDT)
Received: by wx-out-0506.google.com with SMTP id s13so2494190wxc for <aix-l@xxxxxxxxxxxxx>; Wed, 13 Sep 2006 13:18:09 -0700 (PDT)
Received: by 10.90.50.6 with SMTP id x6mr3008088agx; Wed, 13 Sep 2006 13:18:09 -0700 (PDT)
Received: by 10.90.49.8 with HTTP; Wed, 13 Sep 2006 13:18:08 -0700 (PDT)
X-Message-Info: LsUYwwHHNt0q63jKwNMGV16WoQWiUxccY6AWeUeJPTY=
X-ASG-Debug-ID: 1158178661-29b000020001-7mZcl0
X-Barracuda-URL: http://128.112.128.96:8000/cgi-bin/mark.cgi
X-Barracuda-Connect: wx-out-0506.google.com[66.249.82.239]
X-Barracuda-Start-Time: 1158178661
X-ASG-Orig-Subj: Mksysb Script
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at Princeton.EDU
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0
X-Proofpoint-Spam-Details: rule=quarantine_notspam policy=quarantine score=0 mlx=0 adultscore=0 adjust=0 reason=mlx engine=3.0.0-0608080000 definitions=main-0609130008
X-Spam-KB: http://www.Princeton.EDU/spam
X-Spam-Level: Newsgroups: bit.listserv.aix-l
X-To: AIX-L List <aix-l@xxxxxxxxxxxxx>
Precedence: list
List-Help: <https://lists.princeton.edu/cgi-bin/wa?LIST=aix-l>, <mailto:LISTSERV@xxxxxxxxxxxxxxxxxxx?body=INFO aix-l>
List-Unsubscribe: <mailto:aix-l-unsubscribe-request@xxxxxxxxxxxxxxxxxxx>
List-Subscribe: <mailto:aix-l-subscribe-request@xxxxxxxxxxxxxxxxxxx>
List-Owner: <mailto:aix-l-request@xxxxxxxxxxxxxxxxxxx>
List-Archive: <https://lists.princeton.edu/cgi-bin/wa?LIST=aix-l>
Return-Path: owner-aix-l@xxxxxxxxxxxxx
X-OriginalArrivalTime: 13 Sep 2006 20:24:13.0142 (UTC) FILETIME=[93BB7F60:01C6D772]
Hi Aix'ers
Did anyone write a script for mksysb and does some logging of date/time
maybe a list of files that can share it with others? We are running
aix 5.3on P520's and P570's.
Thanks in advance,
Vince
_________________________________________________________________
Check the weather nationwide with MSN Search: Try it now! http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
- Follow-Ups:
- Re: Mksysb Script
- From: Vincent D'Antonio
- Re: Mksysb Script
- From: Bill Verzal
- Re: Mksysb Script
- References:
- Mksysb Script
- From: Vincent D'Antonio
- Mksysb Script
- Prev by Date: Re: Mksysb Script
- Next by Date: Re: Mksysb Script
- Previous by thread: Mksysb Script
- Next by thread: Re: Mksysb Script
- Index(es):
Relevant Pages
- Re: mksysb script
... simply redirect stdout and stderr. ... I've never done very well at scripting
a check of the mksysb. ... Subject: mksysb script ... Or you can verify
the whole image with "lsmksysb" for sure. ... (AIX-L) - Re: Remote mksysb error handling
... It is just a script that runs a savevg (the command mksysb is running) and pipes
it to another system. ... > ended up looking into the named pipe solution. ...
(AIX-L) - Re: Mksysb Script
... echo `date`: Starting mksysb on $hostname>>$log ... mail -s "mksysb
backup errors running $hostname mksysb.sh script" ... Dave Zarnoch ... (AIX-L) - Re: creating bootable mksysb?
... > or dvd-ram disk using the initial mksysb image on disk? ... The mksysb
command is a shell script, you will learn a lot about ... restoring the image.data,
bosinst.data, the correct kernel and about 120 ... Then you change the kernel to be tape bootable
... (comp.unix.aix) - Re: [Full-disclosure] reduction of brute force login attempts via SSHthrough iptables --
... Anyhow its no problem at all to modify, so if you dont like it, just dont use it. ...
on a lame script like this as long as it WORKS and is not insecure. ... echo "~
sorting out ip by ip" ... # echo "not enough failed logins, probably no attack from: ...
(Full-Disclosure)