




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、數(shù)據(jù)庫和存儲數(shù)據(jù)備份策略編寫單位: 日 期:2012.3.12目錄1.文檔說明32.Oracle數(shù)據(jù)庫備份策略32.1 數(shù)據(jù)特點32.2 備份方案32.3 閃回區(qū)大小32.4 管理ORACLE數(shù)據(jù)庫32.5每周運行一次的備份腳本4oracle備份的恢復43 存儲數(shù)據(jù)的備份策略123.1數(shù)據(jù)特點123.2 備份方案123.3 備份類型的選擇123.4 備份窗口選擇123.5 確定介質(zhì)保存時間133.6 計算所需磁帶介質(zhì)數(shù)量133.7備份的災難恢復策略133.8 數(shù)據(jù)備份策略141. 文檔說明本方案是基于目前九江市基礎(chǔ)教育資源庫系統(tǒng)的實際運行情況而設(shè)立的。本方案分為數(shù)據(jù)庫備份策略和存儲數(shù)據(jù)備份策略
2、。這些都是根據(jù)項目中各個不同特點設(shè)計不同的備份策略。具體詳細介紹如下:2. Oracle數(shù)據(jù)庫備份策略2.1 數(shù)據(jù)特點每天新增的數(shù)據(jù)量大超過7天的數(shù)據(jù)很少修改2.2 備份方案每周一次數(shù)據(jù)庫全量備份到硬盤的閃回區(qū)(Oracle備份)每天用磁帶備份整個閃回區(qū)(Oracle+DP備份):即第一天將會備份全量數(shù)據(jù)庫+歸檔日志到磁帶,后面五天只會備份增量的歸檔日志到磁帶(因為全量數(shù)據(jù)庫和之前的歸檔日志已經(jīng)備份)。2.3 閃回區(qū)大小閃回區(qū)大小=全量數(shù)據(jù)庫+兩天的歸檔日志2.4 管理ORACLE數(shù)據(jù)庫系統(tǒng)開機的時候會自動啟動oracle數(shù)據(jù)庫,關(guān)閉oracle數(shù)據(jù)庫服務器,請用如下步驟1、 登陸到X4540
3、服務器(192.168.2.203),切換到root用戶2、 執(zhí)行 oracle10.sh stop,系統(tǒng)會關(guān)閉數(shù)據(jù)庫3、 執(zhí)行 oracle10.sh start,系統(tǒng)會啟動數(shù)據(jù)庫oracle服務設(shè)置:1、程序安裝目錄:/export/home/oracle,SID為zyk2、數(shù)據(jù)庫存放目錄:/data/oradata/zyk3、歸檔日志目錄:/data/oradata/arch4、備份、恢復腳本目錄:/data/oradata/scripts5、RMAN備份臨時目錄:/data/oradata/rmanback以下是oracle10.sh的腳本:#/bin/shcase $1 in sta
4、rt) su - oracle<<EOO lsnrctl start sqlplus /nolog<<EOS connect / as sysdba startupEOS# emctl start dbconsoleEOO ; stop) su - oracle<<EOO lsnrctl stop sqlplus /nolog<<EOS connect / as sysdba shutdown immediateEOS# emctl stop dbconsoleEOO ; *) echo "Usage: $0 start|stop&qu
5、ot; ;esac2.5每周運行一次的備份腳本# 每周執(zhí)行一次# 將數(shù)據(jù)庫拷貝備份到硬盤exp zyk/itrc503zyk_218.65.5.13 file=d:zyk.dmp full=y log=d:zyk.log compress=y;oracle備份的恢復1、 在/data/oradata/rmanback中存在最近的一次備份,如果這份備份也沒有了,則首先從磁帶中恢復oracle的rman備份:選擇最近1周內(nèi)的數(shù)據(jù)恢復到/data/oradata/rmanback目錄2、 用oracle賬號登陸3、 如果oracle進程還在,請先關(guān)閉oracle,執(zhí)行: oracle10.sh st
6、op4、 執(zhí)行以下操作:$ sqlplus /nologSQL*Plus: Release 10.2.0.2.0 - Production on Fri Mar 20 16:17:57 2009Copyright (c) 1982, 2005, Oracle. All Rights Reserved.SQL> connecet /as sysdbaSP2-0734: unknown command beginning "connecet /." - rest of line ignored.SQL> connect /as sysdbaConnected to
7、an idle instance.SQL> startup mountORACLE instance started.Total System Global Area 1694498816 bytesFixed Size 1362508 bytesVariable Size 1537881524 bytesDatabase Buffers 150994944 bytesRedo Buffers 4259840 bytesDatabase mounted.SQL> exitDisconnected from Oracle Database 10g Enterprise Edition
8、 Release 10.2.0.2.0 - ProductionWith the Partitioning, OLAP and Data Mining options$ pwd/export/home/oracle$ cd /data/oradata$ lsarch rmanback scripts zyk zyk.dmp$ cd scripts$ lscontrol.ora hot_database_backup.shdatabase_restore.sh hot_database_backup.sh.outdatabase_restore.sh.outhot_database_backup
9、.sh$ sh database_restore.sh$ cat database_restore.sh.out= started on 2009年03月20日 星期五 16時18分47秒 CST =RMAN: /export/home/oracle/product/10.2.0.2/bin/rmanORACLE_SID: zykORACLE_USER: oracleORACLE_HOME: /export/home/oracle/product/10.2.0.2RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> RM
10、AN> Production on Fri Mar 20 16:18:47 2009Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: ZYK (DBID=3826445544, not open)using target database control file instead of recovery catalogRMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> allocated chan
11、nel: ch00channel ch00: sid=167 devtype=DISKallocated channel: ch01channel ch01: sid=73 devtype=DISKStarting restore at 20-MAR-09channel ch01: starting datafile backupset restorechannel ch01: specifying datafile(s) to restore from backup setrestoring datafile 00001 to /data/oradata/zyk/system01.dbfre
12、storing datafile 00002 to /data/oradata/zyk/undotbs01.dbfrestoring datafile 00003 to /data/oradata/zyk/sysaux01.dbfchannel ch01: reading from backup piece /data/oradata/rmanback/bk_63_1_681991802channel ch00: starting datafile backupset restorechannel ch00: specifying datafile(s) to restore from bac
13、kup setrestoring datafile 00004 to /data/oradata/zyk/users01.dbfrestoring datafile 00005 to /data/oradata/zyk/zyk.dbfchannel ch00: reading from backup piece /data/oradata/rmanback/bk_62_1_681991802channel ch00: restored backup piece 1piece handle=/data/oradata/rmanback/bk_62_1_681991802 tag=HOT_DB_B
14、K_LEVEL0channel ch00: restore complete, elapsed time: 00:00:07channel ch01: restored backup piece 1piece handle=/data/oradata/rmanback/bk_63_1_681991802 tag=HOT_DB_BK_LEVEL0channel ch01: restore complete, elapsed time: 00:00:07Finished restore at 20-MAR-09Starting recover at 20-MAR-09starting media
15、recoverymedia recovery complete, elapsed time: 00:00:07Finished recover at 20-MAR-09released channel: ch00released channel: ch01RMAN> Recovery Manager complete.Script database_restore.sh= ended successfully on 2009年03月20日 星期五 16時19分05秒 CST =(查看恢復是否成功)$ pwd/data/oradata/scripts$ cd .$ lsarch rmanb
16、ack scripts zyk zyk.dmp$ cd zyk$ lscontrol01.ctl old redo03.log undotbs01.dbfcontrol02.ctl redo01.log sysaux01.dbf users01.dbfcontrol03.ctl redo02.log system01.dbf zyk.dbf$ ls -l 總數(shù) 723610-rw-r- 1 oracle dba 7061504 3月 20日 16:19 control01.ctl-rw-r- 1 oracle dba 7061504 3月 20日 16:19 control02.ctl-rw-
17、r- 1 oracle dba 7061504 3月 20日 16:19 control03.ctldrwxr-xr-x 2 root root 8 3月 20日 16:16 old-rw-r- 1 oracle dba 52429312 3月 20日 14:56 redo01.log-rw-r- 1 oracle dba 52429312 3月 20日 14:56 redo02.log-rw-r- 1 oracle dba 52429312 3月 20日 16:15 redo03.log-rw-r- 1 oracle dba 272637952 3月 20日 16:19 sysaux01.d
18、bf-rw-r- 1 oracle dba 503324672 3月 20日 16:19 system01.dbf-rw-r- 1 oracle dba 31465472 3月 20日 16:19 undotbs01.dbf-rw-r- 1 oracle dba 5251072 3月 20日 16:19 users01.dbf-rw-r- 1 oracle dba 2147491840 3月 20日 16:19 zyk.dbf$ sqlplus /nologSQL*Plus: Release 10.2.0.2.0 - Production on Fri Mar 20 16:19:56 2009
19、Copyright (c) 1982, 2005, Oracle. All Rights Reserved.SQL> connect /as sysdbaConnected.SQL> alter database open resetlogs;SQL> alter database open;Database altered.SQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - ProductionWith the Partitioning, OLAP
20、 and Data Mining options$ lsnrctl startLSNRCTL for Solaris: Version 10.2.0.2.0 - Production on 20-MAR-2009 16:20:57Copyright (c) 1991, 2005, Oracle. All rights reserved.Starting /export/home/oracle/product/10.2.0.2/bin/tnslsnr: please wait.TNSLSNR for Solaris: Version 10.2.0.2.0 - ProductionLog mess
21、ages written to /export/home/oracle/product/10.2.0.2/network/log/listener.logListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SunX4540)(PORT=1521)Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)STATUS of the LISTENER-Alias LISTENERVersion TNSLSNR for Solaris: Version 10.2.0.2.0 - Produ
22、ctionStart Date 20-MAR-2009 16:20:57Uptime 0 days 0 hr. 0 min. 0 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Log File /export/home/oracle/product/10.2.0.2/network/log/listener.logListening Endpoints Summary. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SunX4540)(PORT=1521)The
23、 listener supports no servicesThe command completed successfully注:恢復完數(shù)據(jù)庫后,請立即做一次全備。NBUlicense:Active NetBackup Features= License Key: BJX3-KP6C-AC62-96C8-PPOP-NPPP-PPIR-PPDate Added: Mar 19, 2009 at 13:39:56Host: X4150backupProduct: NetBackup Enterprise ServerClient count: See license certificate.Ex
24、pires: No Expiration DateFeature: Base NetBackup License Key: OEXN-PTKA-LNJD-43RC-NC6P-PPCR-CC66-PPP4-KR6P-PDate Added: Mar 19, 2009 at 13:40:31Host: X4150backupProduct: NetBackupClient count: See license certificate.Expires: No Expiration DateFeature: Additional clients License Key: AJXX-J6WC-RY2B-
25、PPPP-PCPP-P3PP-PP6P-IWADate Added: Mar 19, 2009 at 13:40:14Host: X4150backupProduct: NetBackup Enterprise ServerClient count: See license certificate.Expires: No Expiration DateFeature: Additional clients License Key: OEXN-PTKA-LNJD-43RC-NC6P-PPCR-CC66-PPP4-KR6P-PDate Added: Mar 19, 2009 at 13:40:31
26、Host: X4150backupProduct: NetBackupClient count: See license certificate.Expires: No Expiration DateFeature: MS Exchange extensionFeature: MS SQL Server extensionFeature: DB2 extensionFeature: Lotus Notes extensionFeature: Oracle extension License Key: BJX3-KR3P-AC62-96C8-PPPP-PPPU-PPPP-PPDate Added
27、: Mar 19, 2009 at 13:40:22Host: X4150backupProduct: NetBackup Enterprise ServerClient count: See license certificate.Expires: No Expiration DateFeature: Oracle extension License Key: OEXN-PTKA-LNJD-43RC-NC6P-PPCR-CC66-PPP4-KR6P-PDate Added: Mar 19, 2009 at 13:40:31Host: X4150backupProduct: NetBackup
28、Client count: See license certificate.Expires: No Expiration DateFeature: Sybase extension License Key: BJX3-KP6C-AC62-96C8-PPOP-NPPP-PPIR-PPDate Added: Mar 19, 2009 at 13:39:56Host: X4150backupProduct: NetBackup Enterprise ServerClient count: See license certificate.Expires: No Expiration DateFeatu
29、re: Intelligent Disaster RecoveryFeature: Open File Backup - deprecated License Key: OEXN-RTLG-BOWD-N3RP-GPP3-PP3R-PCPP-PPPP-PPPP-CDate Added: Mar 19, 2009 at 13:40:06Host: X4150backupProduct: NetBackupClient count: See license certificate.Expires: No Expiration DateFeature: Library Based Tape Drive
30、s License Key: OEXN-PTKA-LNJD-43RC-NC6P-PPCR-CC66-PPP4-KR6P-PDate Added: Mar 19, 2009 at 13:40:31Host: X4150backupProduct: NetBackupClient count: See license certificate.Expires: No Expiration DateFeature: MS SharePoint Agent License Key: BJX3-KP6C-AC62-96C8-PPOP-NPPP-PPIR-PPDate Added: Mar 19, 2009
31、 at 13:39:56Host: X4150backupProduct: NetBackup Enterprise ServerClient count: See license certificate.Expires: No Expiration DateFeature: StorageTek ACS Robotic LibrariesFeature: Fujitsu LMF Robotic LibrariesFeature: IBM ATL Robotic LibrariesFeature: ADIC DAS/SDLC Robotic LibrariesFeature: Microsof
32、t RSM Robotic LibrariesFeature: Remote Media Server SupportFeature: Robotic Library Sharing SupportFeature: Remote Client SupportFeature: Open File Backup License Key: OEXN-PTKA-LNJD-43RC-NC6P-PPCR-CC66-PPP4-KR6P-PDate Added: Mar 19, 2009 at 13:40:31Host: X4150backupProduct: NetBackupClient count: S
33、ee license certificate.Expires: No Expiration DateFeature: PureDisk MS SQL Server AgentFeature: PureDisk MS Exchange Agent3 存儲數(shù)據(jù)的備份策略3.1數(shù)據(jù)特點數(shù)據(jù)存儲量大每周更新數(shù)據(jù)不多3.2 備份方案一個好的備份/恢復系統(tǒng),除了配備有好的軟硬件之外,更需要有良好的備份策略和管理規(guī)劃來進行保證。對于教學資源庫這樣一個復雜的系統(tǒng),必須根據(jù)各種應用和業(yè)務的處理類型來分別制定具體的備份策略。但總體上來講,一個好的備份策略,必須考慮多方面的因素。采取每周一次增量備份,每月執(zhí)行一次全備份,3.3 備份類型的選擇· 備份類型主要有三種:1. 全備份每次備份定義的所有數(shù)據(jù),優(yōu)點是恢復快,缺點是備份數(shù)據(jù)量大,數(shù)據(jù)多時可能做一次全備份需很長時間2. 增量備份備份自上一次備份以來更新的所有數(shù)據(jù),其優(yōu)點是每次備份的數(shù)據(jù)量少,缺點是恢復時需要全備份及多份增量備份3. 差分
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 公寓用品方案(3篇)
- 廣西教育常規(guī)管理制度
- 完善養(yǎng)老保險管理制度
- 樹木修剪-招標方案(3篇)
- 設(shè)備安全巡檢方案(3篇)
- 農(nóng)資經(jīng)營許可管理制度
- 做好分包進度管理制度
- 公司清算期間管理制度
- DB62T 4358-2021 蚯蚓養(yǎng)殖技術(shù)規(guī)范
- DB62T 4412-2021 水蘿卜設(shè)施栽培技術(shù)規(guī)程
- 2025河南開放大學人力資源管理050504期末在線考試答案
- 餐廳投資協(xié)議書
- 高二日語考試試卷及答案
- 鋼結(jié)構(gòu)安裝施工記錄 - 副本
- 超市食品安全管理制度手冊
- 海鮮水餃供貨合同協(xié)議
- 公共組織績效評估-形考任務二(占10%)-國開(ZJ)-參考資料
- GA/T 2185-2024法庭科學步態(tài)信息采集通用技術(shù)規(guī)范
- 2024年河北省安平縣事業(yè)單位公開招聘村務工作者筆試題帶答案
- 非財務人員的財務管理方法與案例
- 2025《廣東省勞動合同書》
評論
0/150
提交評論