AIX/Linux生產環境下crontab自動排程RMAN物理備份例子
rmanBackupL0(rman 0級增量備份執行指令碼):
run{
backup as compressed backupset incremental level 0 database plus archivelog delete all input;
crosscheck backup;
delete noprompt expired backup;
delete noprompt obsolete;
delete noprompt backup of archivelog all;
backup current controlfile;
sql 'alter database backup controlfile to trace';
}
rmanBackupL1(rman 1級增量備份執行指令碼):
run{
backup as compressed backupset incremental level 1 database plus archivelog delete input;
}
rmanL0Call.sh(Linux系統執行rman 0級備份shell指令碼):
#! /bin/sh
export ORACLE_HOME=/u01/app/oracle/db_1
export ORACLE_SID=test
/u01/app/oracle/db_1/bin/rman target / nocatalog cmdfile=/u01/app/oracle/scripts/rmanBackupL0 log=/u01/app/oracle/scripts/logs/rmanBackupL0.log append
rmanL1Call.sh(Linux系統執行rman 1級備份shell指令碼):
#! /bin/sh
export ORACLE_HOME=/u01/app/oracle/db_1
export ORACLE_SID=test
/u01/app/oracle/db_1/bin/rman target / nocatalog cmdfile=/u01/app/oracle/scripts/rmanBackupL1 log=/u01/app/oracle/scripts/logs/rmanBackupL1.log append
cron_rmanL0(crontab自動排程rman 0級備份指令碼):
0,10,20,30,40,50 * * * * /u01/app/oracle/scripts/rmanL0Call.sh
cron_rmanL1(crontab自動排程rman 1級備份指令碼):
6,15,17,24,27,34,37,44,47,54,57 * * * * /u01/app/oracle/scripts/rmanL1Call.sh
注意:
我們一般在oracle使用者下透過crontab同時呼叫0級備份和1級備份,那麼我們可以執行crontab -e命令,
加入:
0,10,20,30,40,50 * * * * /u01/app/oracle/scripts/rmanL0Call.sh
6,15,17,24,27,34,37,44,47,54,57 * * * * /u01/app/oracle/scripts/rmanL1Call.sh
儲存退出,就可以執行2個指令碼同時排程了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-624737/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- AIX/Linux生產環境下crontab自動排程expdp邏輯備份例子AILinux
- aix下rac環境rman備份策略部署AI
- Oracle生產環境RMAN備份指令碼Oracle指令碼
- Oracle RAC 利用RMAN自動排程備份Oracle
- hacmp環境下的rman備份ACM
- TSM+RMAN 自動備份指令碼 on aix指令碼AI
- Linux環境下資料庫自動邏輯備份Linux資料庫
- 生產環境備份shell指令碼薦指令碼
- rman備份產生等待事件事件
- Oracle ADG環境下的RMAN備份策略Oracle
- Rman 定時備份crontab
- windows下rman自動備份指令碼Windows指令碼
- 快速部署crontab自動排程任務
- Linux環境下的一個rman備份的例項指令碼Linux指令碼
- 用Linux完成Oracle自動物理備份(轉)LinuxOracle
- redhat下通過rman自動備份db!Redhat
- Oracle Windows平臺自動排程備份指令碼OracleWindows指令碼
- RAC環境下的RMAN 備份指令碼一例指令碼
- 用Linux命令完成Oracle自動物理備份(轉)LinuxOracle
- 生產系統下,RMAN的2級備份。以及恢復
- Linux環境下的一個rman備份的例項指令碼(轉載)Linux指令碼
- HP-UX crontab排程不會帶入環境變數UX變數
- 教你用Linux完成Oracle自動物理備份(轉)LinuxOracle
- linux下rman增量備份指令碼以及指令碼自動執行Linux指令碼
- linux環境下ORACLE自啟動LinuxOracle
- RMAN自動備份任務新增
- rman 自動備份指令碼-windows指令碼Windows
- RMAN備份恢復——RAC環境資料庫的備份(zt)資料庫
- RMAN備份恢復--RAC環境資料庫的備份(十)資料庫
- RMAN備份恢復——RAC環境資料庫的備份(一)資料庫
- 【RMAN】RMAN備份恢復3 RMAN增量備份指令碼與crontab計劃任務指令碼
- Oracle裡邏輯備份、物理備份、Rman備份的區別Oracle
- oracle11gRAC環境使用RMAN備份方案Oracle
- windows+oracle環境的RMAN備份計劃WindowsOracle
- oracle rman備份恢復的例子Oracle
- rman備份的shell指令碼(例子)指令碼
- Aix下使用rman備份Oracle RAC資料庫(轉)AIOracle資料庫
- Linux下Mysql定時自動備份LinuxMySql