rman基于时间点恢复

场景:

由于某研究的误操作,导致财务模块的数据丢失,如何使用rman基于时间点恢复数据。

思路

1.克隆数据库的虚拟机,直接对数据库的数据进行恢复

RMAN> shutdown immediate;
RMAN> startup nomount;
RMAN> alter database mount;

RMAN> run{
set until time "to_date('20190918 22:00:00','yyyymmdd hh24:mi:ss')";
restore database;
recover database;
}

RMAN> ALTER DATABASE OPEN RESETLOGS;

2.需要延后5分钟之后的数据,操作如下:

RMAN> shutdown immediate;

RMAN> startup nomount;

####需要恢复,最近最新的control file才能恢复数据。
RMAN> restore CONTROLFILE  FROM '/u01/backup/rman/CTL__oradb_t1019358193_s718_p1_c1_20190919';


RMAN> alter database mount;

RMAN> run{
set until time "to_date('20190918 22:10:00','yyyymmdd hh24:mi:ss')";
restore datafile 12;
recover tablespace fin;
}

SYS@oradb> ALTER DATABASE OPEN RESETLOGS;

相关文章:

  • 2021-11-07
  • 2021-09-22
  • 2021-09-23
  • 2021-10-15
  • 2021-08-22
  • 2022-12-23
  • 2021-10-28
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2021-07-15
  • 2022-02-22
  • 2021-08-13
  • 2021-11-19
  • 2021-05-25
相关资源
相似解决方案