cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle restore to file system

GoodspeedRS
Level 3
Partner Accredited

Is there a way to restore RMAN backups from NetBackup redirecting to file system?

The backups are being made using NetBackup for Oracle (RMAN) to tape.
DBA is using control file and can't keep more than 1 year of backup catalog information. So, he can't restore backups older than that using RMAN. Retention on NetBackup is fine, set to 5 years.

If I select policy type "Oracle" on BAR restore tab, no backup images appear as available to restore.

5 REPLIES 5

Marianne
Level 6
Partner    VIP    Accredited Certified

When you use any database agent, you are backing up data only - no file structures. Like water in a bucket - not the water and the bucket.

You need the backup utility (rman) to provide the structure (bucket) to put the data back (water).

it is not possible to restore rman agent backup to filesystem. This will only be possible if you have full filesystem backup of the client while database was shutdown.

Michael_G_Ander
Level 6
Certified

Think you can get oracle backups to show in the NBAR GUI, but it will probably require some oracle things installed on the backup server and some configuration.

Another option is to find the old control file with bplist have the DBA restore that through rman and then the database.

Do not know if it possible to update a control file like a rman catalog with maintenance channel and crosscheck

Regards

Michael

The standard questions: Have you checked: 1) What has changed. 2) The manual 3) If there are any tech notes or VOX posts regarding the issue

Marianne
Level 6
Partner    VIP    Accredited Certified

Oracle backups can no longer be seen in BAR.

Seems OP has lost interest - no response in 6 weeks....

evo
Level 4
Partner Accredited

If you do not have the RMAN catalog, you can use the following PLSQL to restore the controlfile without using RMAN catalog.

Before you run the PLSQL the database must be in NOMOUNT mod.

You must write the backup piece name (not the backup image name) that contains the controlfile backup to the '/xxxxxxxxx'. The backup piece looks like /cntrl_uermucibk_s23003_p1_t770066804 . You can find the backup piece name by using the following bplist command.
/usr/openv/netbackup/bin/bplist -C <client_name> -S <masterserver_name> -s mm/dd/yyyy -e mm/dd/yyyy -t 4 -l -R /

Also you must the directory, that the controlfile will be restored, to '/tmp/control01.dbf'


--------------------------------------------------------------------------------------------------------------------------------------------

DECLARE

v_devtype VARCHAR2(100);

v_done BOOLEAN;

v_maxPieces NUMBER;

 

TYPE t_pieceName IS TABLE OF varchar2(255) INDEX BY binary_integer;

v_pieceName t_pieceName;

BEGIN

-- You must write backup piece name

v_pieceName(1) := '/xxxxxxxxx';

 

-- Allocate a channel... (for disk backup type=>null, for tape backup type=>'sbt_tape')

v_devtype := DBMS_BACKUP_RESTORE.deviceAllocate(type=>'sbt_tape', ident=>'d1');

 

DBMS_BACKUP_RESTORE.restoreSetDataFile;

 

-- The folder that controlfile will be restored

DBMS_BACKUP_RESTORE.restoreControlFileTo(cfname=>'/tmp/control01.dbf');

 

-- Restore process

DBMS_BACKUP_RESTORE.restoreBackupPiece(handle=>v_pieceName(1), done=>v_done, params=>null);

 

-- Deallocate the channel...

DBMS_BACKUP_RESTORE.deviceDeAllocate('d1');

EXCEPTION

WHEN OTHERS THEN

DBMS_BACKUP_RESTORE.deviceDeAllocate;

RAISE;

END;

/


--------------------------------------------------------------------------------------------------------------------------------------------

 

After you restore the controlfile, you can restore the datafiles and archivelogs by using this controlfile.

This PLSQL worked successfully in Oracle 9. I am not sure that it is suitable for Oracle 10 or 11 but worth to try.

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
You can restore control file from backups. Restoring control file will revive RMAN catalog as it was. 1. Determine backup pieces using bplist command. In usual, backup piece of control file backup begin with 'ctr'. If you can not identify control file backup piece, try latest one in each session. # bplist -t 4 -C client_name -s mm/dd/yyyy -e mm/dd/yyyy -R / 2. Start instance into NOMOUNT mode. 3. Restore control file using following command. RESTORE CONTROLFILE FROM 'backup_piece';