Oracle restore archivelog from NetBackup (從NBU還原Oracle資料庫)

1. 登入 RMAN (Login RMAN as sys)

$ rman target sys/password@tnsname catalog rman/rman@tnsname

2. 執行 還原腳本 (Execute Restore Script)

rman> run {
set archivelog destination to '/u01/app/archivelog';
allocate channel c1 type 'SBT_TAPE' parms 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
SEND 'NB_ORA_SERV=nbusvr,NB_ORA_CLIENT=clientsrv,NB_ORA_POLICY=nbu_policy_name';
restore archivelog from logseq=1234 until logseq=2234;
release channel c1;
}

 

Note:

a. Restore archivelog sequence between number

command: restore archivelog from logseq=1234 until logseq=2234;
result: archivelog seq is 1234 ~ 2233

b. Restore archivelog command

# restore archivelog 兩種方式均可
restore archivelog from logseq=1234 until logseq=2234;
restore archivelog from sequence 1234 until sequence 2234;

c. Restore archivelog to different destination

set archivelog destination to '/u01/app/archivelog';

張貼留言

0 留言