此帖子已超过 5 年
221 消息
0
15947
Avamar restore Oracle 資料庫疑問?
Dear all:
因為要測試一下之前備份的Oracle DB是否有問題,我想做個異機回復,
因為我的Oracle DB是VMware 虛擬機,所以我先Clone出來一份測試機,
然後修改了Hostname 、IP,接下來要開始回復avamar上的Oracle 備份,
但是有個項目遲遲不敢下手,深怕做錯了,而引響了正式運作的機器,
如下圖中,我選好了日期後,開始進行復原,進入Options,
在Restore Destination Client :這裡我選擇了Clone出來的測試機器,
restore everyting to its original location 勾選,這樣是對的嗎?
luczuo
7 消息
0
2014年1月21日 00:00
Hi Mobe
1. 从前面的恢复日志可以看出您的plugin没有问题, PID 1002用的的确是linux oracle plugin
2. number of RMAN channel,指的是备份的通道数目,就是备份的并行度, 比如说您有6个数据文件,那么4个通道可以同时处理备份,生成多个backup piece,但是一个数据文件只能被一个channel处理
3. 回到您的restore问题,请您能否确认在做restore之前,数据库已经处于nomount状态? cat /etc/oratab的结果是什么?
您可以把最新一次恢复的日志放在附件中。谢谢
Regards
Lucas Zuo
liulei_it
3.2K 消息
0
2014年1月21日 20:00
Hi,buddy.
您的case怎麽樣了?
mobe_chang
221 消息
0
2014年1月21日 21:00
抱歉早上有同仁的電腦中毒去幫忙處理了,
目前將avamar的oracle db用檔案形式restore到test_db上,
但不知道要怎麼用rman倒回資料庫!!
liulei_it
3.2K 消息
0
2014年1月21日 22:00
Restore過程有error麽?您是用什麽方法restore呢?有log麽?看您給的圖估計是不能用於恢復Oracle的。
liulei_it
3.2K 消息
0
2014年1月22日 00:00
若restore完成,那麽在磁碟上的文件應該就是 select file_name from dba_data_files 查詢到的結果。但您ls的結果卻是這樣的,是否考慮可以重做一邊?
mobe_chang
221 消息
0
2014年1月22日 02:00
Hi
sorry~今日公司的伺服器有問題,一直還沒去看avamar,
剛剛打算重新在Avamar restore 一次,這次就不要用檔案的方式了,
就用異機還原資料庫.結果還是出錯~
Log #5: /usr/local/avamar/var/MOD-1390381895772-1002-Oracle-topprod-rman1.log
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jan 22 17:18:22 2014Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.RMAN> @@RMAN-topprod-1547-cred1.rman2> connect target *;3> **end-of-file**4> set dbid=2049183205;5> set controlfile autobackup format for device type sbt to 'CONTROLFILE.topprod.%F';6> run {7> allocate channel c0 type sbt PARMS="SBT_LIBRARY=/usr/local/avamar/lib/libobk_avamar64.so" format '%d_%U';8> send channel 'c0' '"--libport=35343" "--cacheprefix=topprod_c0" "--sysdir=/usr/local/avamar/etc" "--bindir=/usr/local/avamar/bin" "--vardir=/usr/local/avamar/var" "--logfile=/usr/local/avamar/var/MOD-1390381895772-1002-Oracle-topprod-avtar.log0" "--ctlcallport=25967"';9> restore controlfile from autobackup MAXSEQ=5 until time = "TO_DATE('20131231','YYYYMMDD')";10> startup mount;11> }12> list backup;13> connected to target database: TOPPROD (DBID=2049183205)executing command: SET DBIDRMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of set command at 01/22/2014 17:18:25RMAN-06188: cannot use command when connected to a mounted target databaseRecovery Manager complete. *********** /usr/local/avamar/var/MOD-1390381895772-1002-Oracle.alg ***********
用RMAN-06188: cannot use command when connected to a mounted target databaseRecovery Manager complete.
google 一下,還沒看懂怎麼解~
luczuo
7 消息
0
2014年1月22日 06:00
Hi Mobe
关于您遇到的错误 ‘RMAN-06188: cannot use command when connected to a mounted target database’, 请您能否确认您的数据库在运行restore时候的状态,您可以运行以下命令来得到数据库当前的状态
sqlplus / as sysdba -- 登录数据库
select status from v$instance; --查看数据库的状态nomout, mount or open ?
我怀疑是因为您的数据库当前处于mount状态,然后Avamar恢复命令的第一条是指定DBID set dbid=2049183205,这个命令是不能在mount状态下运行的
例如:
RMAN> startup mount;
connected to target database (not started)
Oracle instance started
database mounted
RMAN> set dbid=1357639824
executing command: SET DBID
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 01/22/2014 22:22:17
RMAN-06188: cannot use command when connected to a mounted target database.
请您能否确认数据库在restore前是否在nomount状态下?
另外您说的檔案的方式是什么意思? 这句我没有理解。
Regards
Lucas Zuo
liulei_it
3.2K 消息
0
2014年1月22日 06:00
dear 请问
這次就不要用檔案的方式了,就用異機還原資料庫
您做了哪些作業?是不是用原來的備份資料恢復還是重新做一次備份再次恢復?
mobe_chang
221 消息
0
2014年1月22日 17:00
Hi Lucas:
我登入數據庫後,執行select status from v$instance, 出現的是 open
請教如何進入rman模式呢?
因為對資料庫完全的不懂,所以也不知道是在mount or nomount?
我該怎麼使用nomount呢?
另外使用檔案方式restore是指,avamar在 restore時可以選擇用檔案方式倒回資料,
如下圖,不過這樣其實好像也不能用哈:
mobe_chang
221 消息
0
2014年1月22日 17:00
Hi lei:
我還是先用原本的資料庫做一次救援,還沒重新做過備份,
因為我唯一留下的2013/12/31號的備份,是真的要留存的!
所以必須要知道這天的備份可以被救回嗎~
liulei_it
3.2K 消息
0
2014年1月23日 17:00
Dear:
數據庫在open狀態説明數據庫已經是啓動啦不需要您做任何額外的恢復操作啦。您可以在測試數據庫中使用以下命令看看rman運作的清空,sorry,由於我這裡不是用RMAN備份所以不能幫您很多,您可以試試看下面的command。
在做測試的數據庫
select * from v$rman_configuration
select * from v$rman_backup_job_details
select * from v$rman_output
select * from v$rman_status
此外,在GUI的restore-plug-in的選擇中,由於您採用Oracle rman備份數據庫那麽自然選擇“linux oracle rman”,那什麽時候用到“linux file system”這個選項呢?如果您不是使用的RMAN而是begin ... end這個方式備份數據庫,那就要用到這個選擇啦。
liulei_it
3.2K 消息
0
2014年1月23日 17:00
r做恢復數據庫的時候,avama應該有相應的日誌吧。看看那個呢?
liulei_it
3.2K 消息
0
2014年1月23日 23:00
Dear 您那邊的情況怎樣了,其實在被恢復的數據庫的alert log可以看到Rman被使用過的痕跡。
以下是專業人士的回復。
我的11.2.0.4,restore database的时候alert log会显示:
Fri Jan 24 11:49:53 2014
Full restore complete of datafile 4 /u01/app/oracle/oradata/orcl4/users01.dbf. Elapsed time: 0:00:47
checkpoint is 322187027487
last deallocation scn is 322186878212
所以datafile 4是从checkpoint为322187027487的这个备份中恢复的。
进入RMAN:
RMAN> list backup of datafile 4;
using target database control file instead of recovery catalog
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 2.57G DISK 00:04:03 24-JAN-14
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20140124T114110
Piece Name: /u01/app/oracle/product/11.2.0/db_4/dbs/02ous8mm_1_1
List of Datafiles in backup set 2
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
4 Full 322187027487 24-JAN-14 /u01/app/oracle/oradata/orcl4/users01.dbf
所以"Ckp SCN"为322187027487的datafile备份属于TAG20140124T114110,完成于24-JAN-14
liulei_it
3.2K 消息
0
2014年1月24日 00:00
恭喜,如果數據量很大的話的確是要很多時間的啦,這個就是full restore所要消耗的時閒。所以您還需要設置合理的strategy,適當的每天把Oracle歸檔日誌也備份一下,如此通過歸檔日誌來對數據庫open的最後時間進行定位,則可以把數據庫恢復到任何full backup之後的任何時間點。讓他繼續運轉吧看看最後結果會怎樣,那個錯誤顯示有些別標記備份的數據沒有被備份。
mobe_chang
221 消息
0
2014年1月24日 00:00
Hi lei
感謝關心,早上用了luczuo的 方式,目前已經正在restore中,早上到現在還在跑,
正想說等她跑完再來向各位說明進度,看來還要跑很久,
也有看到log一直在倒資料了,
不過這其間有兩個錯誤出現,但是restore卻沒有停,繼續工作中~