#!/bin/ksh
# -------------------------------------------------------------------------
# This is a shell script for making exports directly to tape with a label.
# This label contains the db name and timestamp.
#
# This script also verifies the tape's protection. If the tape is
# protected it will display an error message and ask for a new tape.
#
# Another function lists the tape's label and its contents (option show=y
# of export).
#
# This script also writes a history log with dbname and timestamp.
#
# Sergio Klimberg <sklimberg@hotmail.com>
# -------------------------------------------------------------------------
clear
echo ' ORACLE TAPE EXPORTS '
echo ' ------------------- '
b=' '
while [ "$b" != "end" ]
do
echo
echo "* Enter DB for backup or list / Type 'end' to finish"
echo ' '
read b
if [ "$b" = "end" ]
then
exit
fi
echo ' '
echo "* Mount the tape and hit Enter or type 'list' / Type 'end' to finish"
echo ' '
echo ' - Warning , Verify tape is not protected for backup '
echo ' - If are you going to list the result will appear on screeen and into /tmp/list.txt'
echo ' '
read a
echo ' '
read a
if [ "$a" = "end" ]
then
exit
fi
mt -t /dev/rmt/0m rew
#
if [ "$a" = "list" ]
then
echo
echo "<= Export's Header =>"
tar tf /dev/rmt/0mn
echo " "
echo "* Hit Enter for show the export's remainder / Type 'end' to finish"
echo ' '
read c
if [ "$c" = "end" ]
then
exit
fi
echo 'file=/dev/rmt/0m ' >list.imp
echo 'log=/tmp/list.txt' >>list.imp
echo 'show=y' >>list.imp
echo 'volsize=4000M' >>list.imp
echo 'full=y ' >>list.imp
echo 'back/xxxxxx@'$b >>list.imp
imp parfile=list.imp 2>&1
echo
echo "Type 'end' to finish "
read d
exit
fi
HORA="`date '+%d-%m-%y %H:%M:%S'`"
DESC_EXPORT="EXPORT $b $HORA"
touch "$DESC_EXPORT"
tar cvf /dev/rmt/0mn "$DESC_EXPORT" 2>/dev/null
RTA=$?
while [ $RTA != 0 ]
do
echo "Tape protected , Hit ENTER when it's ready / Type 'end' to finish"
read RTA1
if [ "$RTA1" = "end" ]
then
exit
fi
tar cvf /dev/rmt/0mn "$DESC_EXPORT" 2>/dev/null
RTA=$?
done
TIME_START="`date '+%d/%m/%y %H:%M:%S'`"
echo 'back/xxxxxx@'$b >PARAMETERS.EXP
echo 'file=/dev/rmt/0m ' >>PARAMETERS.EXP
echo 'log=export.log' >>PARAMETERS.EXP
echo 'volsize=4000M' >>PARAMETERS.EXP
echo 'full=y ' >>PARAMETERS.EXP
echo ' ' >>all_export.log
echo 'EXPORT OF : '$b >>all_export.log
echo 'START : ' $TIME_START >>all_export.log
echo ' ' >>all_export.log
exp parfile=PARAMETERS.EXP 2>&1 | tee -a all_export.log
echo ' ' >>all_export.log
TIME_END="`date '+%d/%m/%y %H:%M:%S'`"
echo 'END : ' $TIME_END >>all_export.log
echo "$TIME_START | $TIME_END | $b ">>export_resumen.log
echo ' '
echo "$TIME_START | $TIME_END | $b ">>export_resumen.log
echo ' '
echo Export $b end OK
done
* 이종철님에 의해서 게시물 이동되었습니다 (2006-06-04 12:24)
# -------------------------------------------------------------------------
# This is a shell script for making exports directly to tape with a label.
# This label contains the db name and timestamp.
#
# This script also verifies the tape's protection. If the tape is
# protected it will display an error message and ask for a new tape.
#
# Another function lists the tape's label and its contents (option show=y
# of export).
#
# This script also writes a history log with dbname and timestamp.
#
# Sergio Klimberg <sklimberg@hotmail.com>
# -------------------------------------------------------------------------
clear
echo ' ORACLE TAPE EXPORTS '
echo ' ------------------- '
b=' '
while [ "$b" != "end" ]
do
echo
echo "* Enter DB for backup or list / Type 'end' to finish"
echo ' '
read b
if [ "$b" = "end" ]
then
exit
fi
echo ' '
echo "* Mount the tape and hit Enter or type 'list' / Type 'end' to finish"
echo ' '
echo ' - Warning , Verify tape is not protected for backup '
echo ' - If are you going to list the result will appear on screeen and into /tmp/list.txt'
echo ' '
read a
echo ' '
read a
if [ "$a" = "end" ]
then
exit
fi
mt -t /dev/rmt/0m rew
#
if [ "$a" = "list" ]
then
echo
echo "<= Export's Header =>"
tar tf /dev/rmt/0mn
echo " "
echo "* Hit Enter for show the export's remainder / Type 'end' to finish"
echo ' '
read c
if [ "$c" = "end" ]
then
exit
fi
echo 'file=/dev/rmt/0m ' >list.imp
echo 'log=/tmp/list.txt' >>list.imp
echo 'show=y' >>list.imp
echo 'volsize=4000M' >>list.imp
echo 'full=y ' >>list.imp
echo 'back/xxxxxx@'$b >>list.imp
imp parfile=list.imp 2>&1
echo
echo "Type 'end' to finish "
read d
exit
fi
HORA="`date '+%d-%m-%y %H:%M:%S'`"
DESC_EXPORT="EXPORT $b $HORA"
touch "$DESC_EXPORT"
tar cvf /dev/rmt/0mn "$DESC_EXPORT" 2>/dev/null
RTA=$?
while [ $RTA != 0 ]
do
echo "Tape protected , Hit ENTER when it's ready / Type 'end' to finish"
read RTA1
if [ "$RTA1" = "end" ]
then
exit
fi
tar cvf /dev/rmt/0mn "$DESC_EXPORT" 2>/dev/null
RTA=$?
done
TIME_START="`date '+%d/%m/%y %H:%M:%S'`"
echo 'back/xxxxxx@'$b >PARAMETERS.EXP
echo 'file=/dev/rmt/0m ' >>PARAMETERS.EXP
echo 'log=export.log' >>PARAMETERS.EXP
echo 'volsize=4000M' >>PARAMETERS.EXP
echo 'full=y ' >>PARAMETERS.EXP
echo ' ' >>all_export.log
echo 'EXPORT OF : '$b >>all_export.log
echo 'START : ' $TIME_START >>all_export.log
echo ' ' >>all_export.log
exp parfile=PARAMETERS.EXP 2>&1 | tee -a all_export.log
echo ' ' >>all_export.log
TIME_END="`date '+%d/%m/%y %H:%M:%S'`"
echo 'END : ' $TIME_END >>all_export.log
echo "$TIME_START | $TIME_END | $b ">>export_resumen.log
echo ' '
echo "$TIME_START | $TIME_END | $b ">>export_resumen.log
echo ' '
echo Export $b end OK
done
* 이종철님에 의해서 게시물 이동되었습니다 (2006-06-04 12:24)
[100%환급외,실무전문]빅데이터/SQL/자바/스프링/안드로이드/닷… | 12-27 | 2769 | ||
[채용확정무료교육]오라클자바개발잘하는신입뽑기2개월과정,교육… | 12-11 | 2010 | ||
53 | [평일100%환급7건]웹퍼블리싱,자바&JSP,안드로이드,C#닷넷,SQL기… | 03-15 | 1824 | |
52 | [주말]C#,ASP.NET마스터 | 01-31 | 1982 | |
51 | [기업100%환급,평일주간]SQL기초에서스키마오브젝트,PLSQL,힌트… | 01-31 | 2934 | |
50 | [주말주간]자바&웹,jQUERY,스프링프레임워크,마이바티스 | 01-31 | 1527 | |
49 | [평일주간,평일야간,주말]Spring,MyBatis,Hibernate개발자과정-… | 01-19 | 1851 | |
48 | [평일야간,주말]안드로이드개발자과정(Android기초실무) | 01-11 | 1729 | |
47 | [평일야간,주말주간야간]JAVA,Network&JSP&Spring,MyBatis,Hiber… | 01-03 | 2289 | |
46 | [100%환급외,실무전문]빅데이터/SQL/자바/스프링/안드로이드/닷… | 12-27 | 2769 | |
45 | [평일주간]NoSQL,MongoDB,빅데이터기초과정 | 12-19 | 1942 | |
44 | [평일주간야간, 주말]웹퍼블리싱 마스터(HTML5,CSS3,jQUERY,AJAX… | 12-14 | 1922 | |
43 | [채용확정무료교육]오라클자바개발잘하는신입뽑기2개월과정,교육… | 12-11 | 2010 | |
42 | [평일주간]빅데이터하둡기초과정(BigData Hadoop) | 12-09 | 1568 | |
41 | [평일야간]닷넷(C#,Network,ADO.NET,ASP.NET)마스터 | 12-01 | 1795 | |
40 | [기업100%환급]오라클&자바웹스프링신입과정3주(SQL,JAVA,JSP,Se… | 12-01 | 2007 | |
39 | [평일야간,주말]SQL기초에서실무까지(SQL기초,PLSQL,힌트,튜닝) | 12-01 | 1445 |
댓글 없음:
댓글 쓰기