daily backup script [message #297299] |
Thu, 31 January 2008 01:19 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
guys i need your help, here's my daily backup script and its taking alot of time. we have a really big DB.
so please if you can find out how to make it faster or if you suggest another daily backup script i would be more than grateful.
sun solaris with oracle 8i
thanks alot guys
--------------------------------------------------------------
date
echo !!! Start Export
sqlplus internal <<sqlexp
@export.sql
exit
sqlexp
sqlplus COMPANYname/backlogs1 <<sqlmpb
delete mpb_parameters where user_id = user;
insert into mpb_parameters values(user, 'A');
commit;
exit
sqlmpb
export.exp
echo !!! End Export
echo !!! Start create WF Text files
cd /home/load/wf_load
sqlplus internal <<wf_vacation
@/home/load/wf_load/wf_pr_maint_vacation.sql
@/home/load/wf_load/wf_pr_vacation.sql
exit
wf_vacation
echo !!! Finish create WF Text Files
rm /home8/backup/*
sqlplus internal <<eofsql
set pagesize 0
set feedback off
select 'alter tablespace '||tablespace_name||' begin backup;' from dba_tabl
espaces;
spool backup_tbs.sql
/
spool off
!tar cv0 /home1/oracle/admin/hob1/pfile/* \
/home1/hob1/* \
/home2/hob1/* \
/home3/hob1/* \
/home4/hob1/* \
/home5/hob1/* \
/home6/hob1/* \
/home7/hob1/* \
/home8/hob1/* \
/home8/export/* > /home8/backup/backup.log
select 'alter tablespace '||tablespace_name||' end backup;'
from dba_tablespaces;
spool backup_tbs.sql
/
spool off
exit
eofsql
svrmgrl <<eofsvr
connect internal
archive log stop
!mv /home8/arch/* /home8/backup
archive log start
alter database backup controlfile to '/home8/backup/controlfile.bak';
!tar rv0 /home8/backup/* & >> /home8/backup/backup.log
exit
eofsvr
date
--------------------------------------------------------------
|
|
|
|
|
Re: daily backup script [message #297332 is a reply to message #297329] |
Thu, 31 January 2008 03:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68675 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Quote: | You want it to make it faster? Do you know where you spent your time?
Time each step, remove or delay not necessary ones.
Is it necessary to make an export at the same as a physical backup, for instance?
|
Regards
Michel
[Updated on: Thu, 31 January 2008 03:02] Report message to a moderator
|
|
|