Home » RDBMS Server » Backup & Recovery » RMAN restore and recovery using manual backups
RMAN restore and recovery using manual backups [message #62524] Mon, 26 July 2004 11:09 Go to next message
Kevin Darden
Messages: 6
Registered: July 2004
Junior Member
Is it possible for RMAN to use "user managed" backups? If the datafiles, archivelogs, redo logs, control files are backed up using OS commands, can I then register these files with RMAN and use RMAN to restore and recover a database? Thanks in advance.
Re: RMAN restore and recovery using manual backups [message #62598 is a reply to message #62524] Mon, 02 August 2004 08:04 Go to previous message
Frank Naude
Messages: 4580
Registered: April 1998
Senior Member

Indeed you can! Use the RMAN "CATALOG" command to register your backupcopies and archivelogs in the RMAN catalog. If the catalog is aware of your user-managed copies, it can consider them when a recovery and/or restore is required.

Here is a quick test you can try (on a test database obviously!):

-- Create test tablespace with test data...
create tablespace test datafile '/app/oracle/test1.dbf' size 10M;
create table test_tab (a date) tablespace test;
insert into test_tab values (SYSDATE);

-- Backup the tablespace...
alter tablespace test begin backup;
! cp /app/oracle/test1.dbf /app/oracle/test1.dbf.bak
alter tablespace test end backup;

-- catalog the backup datafile copy in RMAN...
! echo "CATALOG DATAFILECOPY '/app/oracle/test1.dbf.bak';" >rman.cmd
! rman target / catalog rman/rman cmdfile rman.cmd

-- Destroy the datafile!!!
! rm /app/oracle/test1.dbf
alter database datafile '/app/oracle/test1.dbf' offline drop;

-- Restore the datafile using RMAN...
! echo "restore datafile '/app/oracle/test1.dbf';" >rman.cmd
! echo "recover datafile '/app/oracle/test1.dbf';" >>rman.cmd
! rman target / catalog rman/rman cmdfile rman.cmd
alter database datafile '/app/oracle/test1.dbf' online;

-- Check if the data is back...
select * from test_tab;

Best regards.

Previous Topic: Backup & Restore
Next Topic: how to use recover with rman
Goto Forum:

Current Time: Mon May 27 01:36:09 CDT 2024