LaGiPusHinGWitH ---- IT
Navigation
Home |
Categories
Monthly Archives
- September 2010
- October 2009
- December 2008
- November 2008
- October 2008
- September 2008
- July 2008
- May 2008
- March 2008
- December 2007
- October 2007
- September 2007
- August 2007
Most recent entries
- Create Oracle Tablespace on SAP with BRTools
- Audit on Oracle Database
- Membuat Oracle Data Guard
- Cerita Tentang Kamu
- Membuat ulang/re-create controlfile di oracle
- Membuat RMAN dengan crontab
- Saat kau hadir kembali
- Memindahkan controlfile dan redologfile pada Oracle
- Oracle Dataguard on Standart Edition
- Adakah aku dihatimu
- Instalasi 10g di HP-UX Itanium
- Instalasi OpenOffice di Slackware 12
- Syncronize archive log
- Merubah ukuran archived Log
- Alter Block Size for tablespace
Syndicate
Site Credits
Powered by:
ExpressionEngine
Design by:
BlogMoxie
Untuk artikel kali ini, saya akan membuat script RMAN yang akan dijalankan secara terjadwal
dengan menggunakan crontab…
Langkah-langkah yang dilakukan adalah:
1. membuat file fullbackup_rman.sh
* * * * * /app1/oracle/scripts/fullbackup_rman.sh > /app1/oracle/backup/rman_fullbackup/fullbackup_rman.log
====================================
#vi fullbackup_rman.sh
ORACLE_SID=training; export ORACLE_SID
ORACLE_HOME=/ora10g/app/oracle/OraHome_1
export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin:/bin:/usr/bin:/usr/ucb:/etc:.;export PATH
rman target=/ @/app1/oracle/scripts/fullbackup_script.conf -> path tempat menaruh script RMAN
================================
2. buat file fullbackup_script.conf
contoh script RMAN yang akan dijalankan.
#vi /app1/oracle/scripts/fullbackup_script.conf
run
{
allocate channel ch1 type disk;
backup
incremental level 0
filesperset 1
format ‘/app1/oracle_backup/data_%T_d%d_p%p_U%U.bak’
(database);
backup
incremental level 0
format ‘/app1/oracle_backup/cf_%T_d%d_p%p_U%U.bak’
(current controlfile);
delete noprompt obsolete;
}
exit;
============================
Cara membuat Crontab file
___________
Crontab syntax :-
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
* in the value field above means all legal values as in braces for that column.
The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).
Note: The specification of days can be made in two fields: month day and weekday. If both are specified in an entry, they are cumulative meaning both of the entries will get executed .
3. membuat Crontab untuk menjalankan RMAN
_______
contoh crontab ini akan menjalankan script /app1/oracle/scripts/fullbackup_rman.sh dan membuat log di /app1/oracle/backup/rman_fullbackup/fullbackup_rman.log
setiap hari pada jam 6:30 PM.
30 18 * * * /app1/oracle/scripts/fullbackup_rman.sh > /app1/oracle/backup/rman_fullbackup/fullbackup_rman.log
=================================
$ chmod 775 fullbackup_rman.sh
$ crontab -e => 30 18 * * * /app1/oracle/scripts/fullbackup_rman.sh > /app1/oracle/backup/rman_fullbackup/fullbackup_rman.log
$ crontab -l
=================================
Computer DataBase • (0) Comments • (563) Trackbacks • Permalink