Re: mksysb script
From: Pipiron (pipiron0309_at_yahoo.com)
Date: 06/13/03
- Next message: Chuck Dillon: "Re: mksysb script"
- Previous message: Pipiron: "Re: mksysb script"
- In reply to: Bigi Brada: "Re: mksysb script"
- Next in thread: Pipiron: "Re: mksysb script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 13 Jun 2003 16:06:09 +0200
Hi Marc,
I have tried the script and it works fine regarding mksysb. Script does
start mksysb, it does create log file with date but file is empty.
Now I put the line for errors only, but I prefer to have some text in it. It
means that depending of return code of command it should be successfully
finished backup or unsuccessfully.
I have enough space in /tmp and the script is executable
Best regards
PJ
"Bigi Brada" <bigibrada@hotmail.com> wrote in message
news:1055510432.297867@newsreader1.wirehub.nl...
> Pipiron <pipiron0309@yahoo.com> wrote in message
> news:1055507248.4432@internet.fina.hr...
> > Dear colleagues,
> >
> > I should schedule mksysb on AIX 4.3.3 machine every day at the same
time.
> > Also should have record in a log file about backup and status of backup.
> So
> > I made following script:
> >
> > bkup_ skripta
> >
> > #!/bin/ksh
> > mv /tmp/bkup/mksysb.log /tmp/bkup/YYYYMMDD.mksysb.log
> > /usr/bin/mksysb -i /dev/rmt0
> > mt -f /dev/rmt0 rewoffl
> >
> > In Cron
> >
> > 1) crontab -e
> > 2) 22 05 * * 1,2,3,4,5 /tmp/bkup/bkup_ skripta>> /tmp/bkup/mksysb.log >
> 2&1
> >
> >
> > This last line in Cron should report error if occurs. But, all the time
I
> > have logs with nothing in it (size 0), even if error occurs.
> > Now I am not a guru for scripting, so I would really appreciate if
someone
> > can help me about following:
> > how can I have logs with status of backup in it. That means I should
have
> > something like
> >
> > 20030625.mksysb.log and in it either "Backup finished successfully"
either
> > "Backup finished with errors"
> >
> > Thanks in advance
> >
> > PJ
>
> Is there any message in your mail?
> Is there enough space in /tmp to create temp-files en log 4 the backup?
> Try running the backup script on the command line with the log redirected
as
> you do
> and see if it runs fine then you know if the problem is the cron or the
> script!
> Are you sure the script is executable? (i.e. # chmod 700 /tmp/bkup/bkup_
> skripta)
> You can start mksysb with -X to auto-expand /tmp.
>
> This is my cron entry:
> 0 19 * * 1-5 /usr/local/backup/backup.sh
>
> This is my backup script in short:
>
> LOG="/usr/local/log/backup_RS-EV1.log"
> DEV="/dev/rmt1"
>
> # Rotate logfiles:
> mv $LOG.13 $LOG.14 >/dev/null 2>&1
> mv $LOG.12 $LOG.13 >/dev/null 2>&1
> mv $LOG.11 $LOG.12 >/dev/null 2>&1
> mv $LOG.10 $LOG.11 >/dev/null 2>&1
> mv $LOG.9 $LOG.10 >/dev/null 2>&1
> mv $LOG.8 $LOG.9 >/dev/null 2>&1
> mv $LOG.7 $LOG.8 >/dev/null 2>&1
> mv $LOG.6 $LOG.7 >/dev/null 2>&1
> mv $LOG.5 $LOG.6 >/dev/null 2>&1
> mv $LOG.4 $LOG.5 >/dev/null 2>&1
> mv $LOG.3 $LOG.4 >/dev/null 2>&1
> mv $LOG.2 $LOG.3 >/dev/null 2>&1
> mv $LOG.1 $LOG.2 >/dev/null 2>&1
> mv $LOG $LOG.1 >/dev/null 2>&1
>
> /usr/bin/mksysb -X -m -p $DEV >>$LOG 2>&1
>
> Good luck
> Marc
>
>
- Next message: Chuck Dillon: "Re: mksysb script"
- Previous message: Pipiron: "Re: mksysb script"
- In reply to: Bigi Brada: "Re: mksysb script"
- Next in thread: Pipiron: "Re: mksysb script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|