среда, 28 января 2026 г.

RMAN Point-In-Time Recovery

Mount the instance

su - oracle
cd /backups/CDB19/rman/backup
 
rman target /

RMAN> startup mount;

Restore the datafiles and Recover the database

RMAN> run
{
  allocate channel dev1 type disk;
  set until time "to_date('2026-09-26 02:00:00', 'yyyy-mm-dd h24:mi:ss')";
  restore database;
  recover database;
}
Recovery Manager complete.

Open the database and reset logs

RMAN> alter database open resetlogs;
database opened
RMAN> quit
🛈 This will update all current datafiles and online redo logs and all subsequent archived redo logs with a new RESETLOGS SCN and time stamp.

🛈 As soon as you have done a resetlogs run a full backup, this is important as should you suffer a second failure you will not be able to perform a second recovery because after resetting the logs the SCN numbers will no longer match any older backup files.

Комментариев нет:

Отправить комментарий