Home » RDBMS Server » Backup & Recovery » daily backup script
daily backup script [message #297299] Thu, 31 January 2008 01:19 Go to next message
ziadaher
Messages: 70
Registered: October 2007
Location: lebanon
Member

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 #297308 is a reply to message #297299] Thu, 31 January 2008 01:39 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
If you want us to help you, you have to first help us help you.
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code.
Use the "Preview Message" button to verify.

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
Re: daily backup script [message #297329 is a reply to message #297308] Thu, 31 January 2008 02:48 Go to previous messageGo to next message
ziadaher
Messages: 70
Registered: October 2007
Location: lebanon
Member

sorry about it
i'll keep it in mind next time
so any suggested scripts
Re: daily backup script [message #297332 is a reply to message #297329] Thu, 31 January 2008 03:01 Go to previous message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
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

Previous Topic: Rman Log File
Next Topic: Backup and Recovery
Goto Forum:
  


Current Time: Fri Nov 29 12:16:00 CST 2024