數(shù)據(jù)庫存儲(chǔ)備份策略_第1頁
數(shù)據(jù)庫存儲(chǔ)備份策略_第2頁
數(shù)據(jù)庫存儲(chǔ)備份策略_第3頁
數(shù)據(jù)庫存儲(chǔ)備份策略_第4頁
數(shù)據(jù)庫存儲(chǔ)備份策略_第5頁
已閱讀5頁,還剩9頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、數(shù)據(jù)庫和存儲(chǔ)數(shù)據(jù)備份策略編寫單位: 日 期:2012.3.12目錄1.文檔說明32.Oracle數(shù)據(jù)庫備份策略32.1 數(shù)據(jù)特點(diǎn)32.2 備份方案32.3 閃回區(qū)大小32.4 管理ORACLE數(shù)據(jù)庫32.5每周運(yùn)行一次的備份腳本4oracle備份的恢復(fù)43 存儲(chǔ)數(shù)據(jù)的備份策略123.1數(shù)據(jù)特點(diǎn)123.2 備份方案123.3 備份類型的選擇123.4 備份窗口選擇123.5 確定介質(zhì)保存時(shí)間133.6 計(jì)算所需磁帶介質(zhì)數(shù)量133.7備份的災(zāi)難恢復(fù)策略133.8 數(shù)據(jù)備份策略141. 文檔說明本方案是基于目前九江市基礎(chǔ)教育資源庫系統(tǒng)的實(shí)際運(yùn)行情況而設(shè)立的。本方案分為數(shù)據(jù)庫備份策略和存儲(chǔ)數(shù)據(jù)備份策略

2、。這些都是根據(jù)項(xiàng)目中各個(gè)不同特點(diǎn)設(shè)計(jì)不同的備份策略。具體詳細(xì)介紹如下:2. Oracle數(shù)據(jù)庫備份策略2.1 數(shù)據(jù)特點(diǎn)每天新增的數(shù)據(jù)量大超過7天的數(shù)據(jù)很少修改2.2 備份方案每周一次數(shù)據(jù)庫全量備份到硬盤的閃回區(qū)(Oracle備份)每天用磁帶備份整個(gè)閃回區(qū)(Oracle+DP備份):即第一天將會(huì)備份全量數(shù)據(jù)庫+歸檔日志到磁帶,后面五天只會(huì)備份增量的歸檔日志到磁帶(因?yàn)槿繑?shù)據(jù)庫和之前的歸檔日志已經(jīng)備份)。2.3 閃回區(qū)大小閃回區(qū)大小=全量數(shù)據(jù)庫+兩天的歸檔日志2.4 管理ORACLE數(shù)據(jù)庫系統(tǒng)開機(jī)的時(shí)候會(huì)自動(dòng)啟動(dòng)oracle數(shù)據(jù)庫,關(guān)閉oracle數(shù)據(jù)庫服務(wù)器,請(qǐng)用如下步驟1、 登陸到X4540

3、服務(wù)器(192.168.2.203),切換到root用戶2、 執(zhí)行 oracle10.sh stop,系統(tǒng)會(huì)關(guān)閉數(shù)據(jù)庫3、 執(zhí)行 oracle10.sh start,系統(tǒng)會(huì)啟動(dòng)數(shù)據(jù)庫oracle服務(wù)設(shè)置:1、程序安裝目錄:/export/home/oracle,SID為zyk2、數(shù)據(jù)庫存放目錄:/data/oradata/zyk3、歸檔日志目錄:/data/oradata/arch4、備份、恢復(fù)腳本目錄:/data/oradata/scripts5、RMAN備份臨時(shí)目錄:/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每周運(yùn)行一次的備份腳本# 每周執(zhí)行一次# 將數(shù)據(jù)庫拷貝備份到硬盤exp zyk/itrc503zyk_218.65.5.13 file=d:zyk.dmp full=y log=d:zyk.log compress=y;oracle備份的恢復(fù)1、 在/data/oradata/rmanback中存在最近的一次備份,如果這份備份也沒有了,則首先從磁帶中恢復(fù)oracle的rman備份:選擇最近1周內(nèi)的數(shù)據(jù)恢復(fù)到/data/oradata/rmanback目錄2、 用oracle賬號(hào)登陸3、 如果oracle進(jìn)程還在,請(qǐng)先關(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時(shí)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時(shí)19分05秒 CST =(查看恢復(fù)是否成功)$ 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注:恢復(fù)完數(shù)據(jù)庫后,請(qǐng)立即做一次全備。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 存儲(chǔ)數(shù)據(jù)的備份策略3.1數(shù)據(jù)特點(diǎn)數(shù)據(jù)存儲(chǔ)量大每周更新數(shù)據(jù)不多3.2 備份方案一個(gè)好的備份/恢復(fù)系統(tǒng),除了配備有好的軟硬件之外,更需要有良好的備份策略和管理規(guī)劃來進(jìn)行保證。對(duì)于教學(xué)資源庫這樣一個(gè)復(fù)雜的系統(tǒng),必須根據(jù)各種應(yīng)用和業(yè)務(wù)的處理類型來分別制定具體的備份策略。但總體上來講,一個(gè)好的備份策略,必須考慮多方面的因素。采取每周一次增量備份,每月執(zhí)行一次全備份,3.3 備份類型的選擇· 備份類型主要有三種:1. 全備份每次備份定義的所有數(shù)據(jù),優(yōu)點(diǎn)是恢復(fù)快,缺點(diǎn)是備份數(shù)據(jù)量大,數(shù)據(jù)多時(shí)可能做一次全備份需很長(zhǎng)時(shí)間2. 增量備份備份自上一次備份以來更新的所有數(shù)據(jù),其優(yōu)點(diǎn)是每次備份的數(shù)據(jù)量少,缺點(diǎn)是恢復(fù)時(shí)需要全備份及多份增量備份3. 差分

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論