 |
|
Oracle
Concepts - Example Output from the Hot Backup Script Generator
Oracle Tips by Burleson Consulting |
SOURCE
2 Example of output from the hot backup script
generator.
REM Online Backup Script for ORTEST1 instance
REM Script uses UNIX tar format backup commands
REM created on 25-may-1999 20:09 by user SYSTEM
REM developed for RevealNet by Mike Ault-DBMentors International
7-Oct-1998
REM Script expects to be fed backup directory location on execution.
REM Script should be re-run when physical database structure altered.
REM
REM
REM Backup for tablespace SYSTEM
REM
alter tablespace SYSTEM begin backup;
host
/bin/tar cvf - /ud2/ORACLE2/ORTEST1/DATA/SYS1ORTEST1.DBF \
|compress>/tape1/SYSTEM_25_may_99.Z
exit
alter tablespace SYSTEM end backup;
REM
REM Backup for tablespace USER_DATA
REM
alter tablespace USER_DATA begin backup;
host
/bin/tar cvrf - /ud2/ORACLE2/ORTEST1/DATA/USR1ORTEST1.DBF \
|compress>/tape1/USER_DATA_25_may_99.Z
exit
alter
tablespace USER_DATA end backup;
REM
REM Backup for tablespace TOOLS
REM
alter tablespace TOOLS begin backup;
host
/bin/tar cvrf - /ud2/ORACLE2/ORTEST1/DATA/TOOLS1ORTEST1.DBF
|compress>/tape1/TOOLS_25_may_99.Z
exit
alter
tablespace TOOLS end backup;
REM
REM Backup for tablespace RBS
REM
alter tablespace RBS begin backup;
host
/bin/tar cvrf - /ud3/ORACLE3/ORTEST1/DATA/RBS1ORTEST1.DBF
|compress>/tape1/RBS_25_may_99.Z
exit
alter tablespace RBS end backup;
REM
REM Backup for tablespace TEMP
REM
alter tablespace TEMP begin backup;
host
/bin/tar cvrf - /ud4/ORACLE4/ORTEST1/DATA/TMP1ORTEST1.DBF
/ud4/ORACLE4/ORTEST1/DATA/TMP2ORTEST1.DBF
|compress>/tape1/TEMP_25_may_99.Z
exit
alter
tablespace TEMP end backup;
REM
REM Backup for tablespace TELE_DATA
REM
alter tablespace TELE_DATA begin backup;
host
/bin/tar cvrf - /ud2/ORACLE2/ORTEST1/DATA/TELEDAT1ORTEST1.DBF
\
|compress>/tape1/TELE_DATA_25_may_99.Z
exit
alter tablespace TELE_DATA end backup;
REM
REM Backup for tablespace TELE_INDEX
REM
alter tablespace TELE_INDEX begin backup;
host
/bin/tar cvrf - /ud3/ORACLE3/ORTEST1/DATA/TELEIDX1ORTEST1.ORA\
|compress>/tape1/TELE_INDEX_25_may_99.Z
exit
alter tablespace TELE_INDEX end backup;
REM
REM Backup for tablespace GRAPHICS_DATA
REM
alter tablespace GRAPHICS_DATA begin backup;
host
/bin/tar cvrf - /ud2/ORACLE2/ORTEST1/DATA/GRPHDAT1ORTEST1.DBF \
|compress>/tape1/GRAPHICS_DATA_25_may_99.Z
exit
alter tablespace GRAPHICS_DATA end backup;
REM
REM Backup for tablespace GRAPHICS_INDEX
REM
alter tablespace GRAPHICS_INDEX begin backup;
host
/bin/tar cvf - /ud3/ORACLE3/ORTEST1/DATA/GRPHIDX1ORTEST1.ORA \
|compress>/tape1/GRAPHICS_INDEX_25_may_99.Z
exit
alter tablespace GRAPHICS_INDEX end backup;
REM
REM Backup for redo logs
REM Normally you will not recover redo logs
REM
host
/bin/tar cvrf - \
/ud3/ORACLE3/ORTEST1/REDO/LOG11ORTEST1.DBF\
/ud4/ORACLE4/ORTEST1/REDO/LOG12ORTEST1.DBF\
/ud4/ORACLE4/ORTEST1/REDO/LOG21ORTEST1.DBF\
/ud1/ORACLE1/ORTEST1/REDO/LOG22ORTEST1.DBF\
/ud1/ORACLE1/ORTEST1/REDO/LOG31ORTEST1.DBF\
/ud3/ORACLE3/ORTEST1/REDO/LOG32ORTEST1.DBF\
|compress>/tape1/redo_logs_25_may_99.Z
exit
REM
REM Backup for archive logs
REM
alter system switch logfile;
archive log
all;
host compress /ud4/ORACLE4/ORTEST1/ARCHIVE/*
host tar cvrf -
*.Z|compress>/tape1/_25_may_99.Z
alter database backup control file to
/tape1/ora_conbackup_25_may_99.bac;
This is an excerpt from
the eBook "Oracle
DBA made Simple".
For more details on Oracle
database administration, see the "Easy
Oracle Jumpstart" by Robert Freeman and Steve Karam. It?s
only $19.95 when you buy it directly from the publisher
here.
|