Hello,
I'm currently working with a company that has many legacy Oracle databases on multiple servers, both Linux and Windows. All of the servers are backed up via snapshot on a regular basis without shutting down the Oracle database. These snapshots can be restored to a VM in the event of a disaster. In the event of disaster recovery, I need to make sure that the Oracle databases on these servers can be restored to their backed up state on the VM. At the beginning of the backup process, I have the ability to run a bat/sh script. I'd like to use this to run an RMAN backup script to capture the database at that point in time. My hope is that after restoring the snapshot on the VM, I'll be able to run an RMAN restore/recover script to put the database in the same state as when the snapshot backup occurred. This is going to be made more complicated by the fact that
Some of the databases already have RMAN backup scripts while others do not.
Some of the databases are run in ARCHIVELOG mode while others are not.
Since the databases have many different configurations, I'm assuming that a single RMAN script is not going to be sufficient in all cases, e.g., needing to shutdown databases that are not run in ARCHIVELOG mode. While this is inconvenient, what concerns me more is the servers that already have RMAN backup scripts in place. As I understand it (and please forgive me as I'm new to Oracle and RMAN, although not to relational databases), the backup information is stored within the Oracle database. What is unclear is if I setup an additional backup area on disk for the backups I want to run, will this compromise an existing backup configuration, i.e., will the new backups prevent the users of the server from doing recovery based on their backup configuration?
I have run one test on an Oracle 19c Windows server using the following RMAN script for the backup:
[code]run {
configure backup optimization on;
configure controlfile autobackup on;
allocate channel ORCL
type disk format '/backups/orcl/%U';
set controlfile autobackup
format for device type disk to '/backups/orcl/cf_%F';
backup incremental level 0
as compressed backupset
database plus archivelog
delete input;
delete force noprompt obsolete;
release channel ORCL;
}[/code]
The backup appears to work as expected. When I restore the snapshot on a new VM, I run the following RMAN script to restore/recover the database
[code]
connect target / ;
shutdown immediate;
startup mount;
restore database;
recover database;
alter database open;
exit;
[/code]
This script usually fails during the 'recovery database' step with an error similar to
ORA-00314: log 1 of thread 1, expected sequence# 1189 doesn't match 1186
I can manually workaround this by using SQL PLUS and doing a 'recover database using backup controlfile until cancel' command and then 'alter database open resetlogs', but I'm at a loss for why the original recover doesn't work. This database is not being updated with any regularity. The failure has me concerned that the my entire backup/recovery premise is flawed and will not work.
Any advice or pointers would be greatly appreciated.
Steve