1.查看A机的备份作业:全量、增量
2.确认 全量、增量、归档备份集已完成
3.将备份集全量、增量、归档拷贝到需要恢复的机器B
以下是B机上的恢复操作
4.恢复机B上创建空实例,page_size一定要保持与原库(备份的库)一致。
5.恢复归档日志
RMAN> restore archive log from backupset '/home/dmdba/backup/ARCH_LOG_DAMENG_2022_12_28_10_02_12' to archivedir '/home/dmdba/backup/arch';
6.还原数据文件
RMAN> restore database '/dm8/dbdata1/TEST/dm.ini' from backupset '/home/dmdba/backup/DB_DAMENG_INCREMENT_2022_12_28_09_50_12' with backupdir '/home/dmdba/backup/DB_DAMENG_FULL_2022_12_27_22_00_11';
7.指定归档目录恢复
RMAN> recover database '/dm8/dbdata1/TEST/dm.ini' with archivedir '/home/dmdba/backup/arch';
8.更新数据库db_magic(魔数)
RMAN>RECOVER DATABASE '/dm8/dbdata1/TEST/dm.ini' UPDATE DB_MAGIC;
9.启动数据库
$ /home/dmdba/dmdbms/bin/dmserver /dm8/dbdata1/TEST/dm.ini
file dm.key not found, use default license!
version info: develop
DM Database Server 64 V8 03134283890-20220720-165295-10045 startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2023-07-20
file lsn: 720672
ndct db load finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct fill fast pool finished
iid page's trxid[93874]
NEXT TRX ID = 93875
pseg_collect_mgr_items, total collect 1 active_trxs, 0 cmt_trxs, 0 pre_cmt_trxs, 0 to_release_trxs, 1 active_pages, 0 cmt_pages, 0 pre_cmt_pages, 0 to_release_pages, 1 mgr pages, 1 mgr recs!
iid page's trxid[94876]
NEXT TRX ID = 95878.
total 1 active crash trx, pseg_crash_trx_rollback sys_only(0) begin ...
trx: 93582 rollbacking...
total [1/1] page rollbacked, rollback percent: 100%
total [1/1] trx rollbacked, rollback percent: 100%
trx: 93582 rollback 1 upages, 2 urecs end
pseg_crash_trx_rollback end, total 1 active crash trx, include 0 empty_trxs, 0 empty_pages which only need to delete mgr recs.
pseg_crash_trx_rollback end
pseg recv finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
systables desc init success.
ndct_db_load_info success.
nsvr_process_before_open begin.
nsvr_process_before_open success.
total 0 active crash trx, pseg_crash_trx_rollback sys_only(0) begin ...
pseg_crash_trx_rollback end, total 0 active crash trx, include 0 empty_trxs, 0 empty_pages which only need to delete mgr recs.
pseg_crash_trx_rollback end
SYSTEM IS READY.
purg2_crash_cmt_trx end, total 0 trx, 0 pages purged
10.登录数据库验证ok
在线服务平台地址:
https://eco.dameng.com