Netbackup(NBU) 之 Oracle 备份、还原

2023年 8月 23日 60.1k 0

在NBU master服务器上创建文件 C:\Program Files\Veritas\NetBackup\db\altnames\No.Restrictions

2.1 查看 NBU 上的备份记录

在NBU Server上cmd執行

C:\Program Files\Veritas\NetBackup\bin>bplist -C xxxxx -t 4 -R -l /C:\Program Files\Veritas\NetBackup\bin>bplist -C xxxxx -t 4 -s 08/12/2023 -e 08/15/2023 -l -R /(前面路径是 NBU 软件所在位置,xxxx 是源备份主机电脑名)

2.2 还原

2.2.1 还原 spfile 文件

run{ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';send 'NB_ORA_SERV=xxxx1,NB_ORA_CLIENT=XXXX2';restore spfile from 'xxxxx3';release channel ch00;}
xxx1:是NBU server電腦名xxx2:是源備份主機名xxx3:是根據步驟2查到的spfile備份文件名,文件名带1_1是否带域名 ,电脑名主要看在 hosts 文件中怎么配的

2.2.2 启动数据库到 nomount

根据第一步得到的 spfile,启动数据库到 nomount

2.2.3 还原 controlfile

RMAN中執行,数据启动到 nomount 阶段run{ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';send 'NB_ORA_SERV=ty05.ty.com,NB_ORA_CLIENT=ty22';restore controlfile from 'cntrl_14_1_1044778225';release channel ch00;}

2.2.4 修改数据库到 mount

2.2.5 还原 database

run {allocate channel ch00 type 'SBT_TAPE';send 'nb_ora_serv=ty05.ty.com,nb_ora_client=ty22';restore database;recover database;release channel ch00;}
如果出現:Starting recover at 10-MAY-18using channel ORA_DISK_1starting media recoveryunable to find archived logarchived log thread=1 sequence=2RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of recover command at 05/10/2018 14:33:02RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 2 and starting SCN of 1242586
則:recover database until scn 1242586
如果沒有歸檔日誌需要恢復,則:recover database noredo;若果還是報錯,如ORA-01113:file 1 nneds media recoveryORA-01110: data file 1 : '/home/oracle/app/oracle/oradata/orcl/system.dbf'則需添加隱藏參數,取消數據庫啟動前的一致性檢查即可:SQL>create pfile='/tmp/a.ora' from spfile;shutdown immediatevi /tmp/a.ora加上: *._allow_resetlogs_corruption=trueSQL>startup mount pfile='/tmp/a.ora'

2.2.6 open 數據庫

alter database open resetlogs; (如果恢復的數據庫版本不一致,則會提示: ORA-01092:ORACLE instance terminated. Disconnection forced ORA-00704:bootstrap process failure ORA-39700:database must be opened with UPGRADE option Process ID:13147 Session ID:1 Serial number:5
則開啟數據庫需執行:alter upgrade open resetlogs;

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论