Re: mksysb script
From: Bigi Brada (bigibrada_at_hotmail.com)
Date: 06/13/03
- Next message: Pipiron: "Re: mksysb script"
- Previous message: T.R.Bennett: "Re: Apache"
- In reply to: Pipiron: "mksysb script"
- Next in thread: Pipiron: "Re: mksysb script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 13 Jun 2003 15:18:29 +0200
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: Pipiron: "Re: mksysb script"
- Previous message: T.R.Bennett: "Re: Apache"
- In reply to: Pipiron: "mksysb script"
- Next in thread: Pipiron: "Re: mksysb script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|