cancel
Showing results for 
Search instead for 
Did you mean: 

Copying redo log files back on OS ?

Former Member
0 Kudos

HI Gurus,

We are running SAP on AIX + Oracle 10g.

We are taking regular online+redo log file backup of PRD system directly ON TAPE using brtools.

We have a requirement now wherein client is asking to copy few redo log files back from yesterdays backup ( on tape ) to server disk.

He just want to copy those log files to server and don't want to apply them in database.

My query is since we took backup using brtools, if we will run brrestore than apart from copying the log files it will apply those archives in database also ?

Is there any work around where we can just copy the redo log files from the backup on tape and not apply them directly ??

Cheers !

Shobhit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shobhit,

I understand that you would like restore specific offline redolog files into a directory, without apply. Please find the example, below;

brrestore -a 10-25=/oracle/oraarch_new

This will restore offline redolog files between 10 and 25 into /oracle/oraarch_new without apply to the database.

Best regards,

Orkun Gedik

Former Member
0 Kudos

Thanks a lot Orkun !

This command will work in case the backup files are stored on tape directly ?

If its just one redo log file I want to copy than shall I use below command ?

brrestore -a <filename>=/oracle/oraarch_new

Cheers !

Shobhit Garg

volker_borowski2
Active Contributor
0 Kudos

No,

-a or -a2 always require the redolog number.

This is for all redologs saved with brarchive and valid for the DB13 calls with "+redologs" because these are saved with brarchive which is called from brbackup.

The only difference might be, when you did an type online_cons backup. In this case, the logs got backed up with brbackup, not brarchive, so in this case, you would restore with option -m like

brrestore -m /oracle/SID/oraarch/SIDarch1_nnnn.dbf -b logname_of_online_cons_backup

For more information call "brrestore -help".

brrestore will only do the restore. It may overwrite existing files, but will not apply logs.

brrecover can apply logs if told to do.

Volker

Former Member
0 Kudos

Yes, you can. Please find the further information in the document, below;

http://help.sap.com/saphelp_nw70/helpdata/en/0d/d3077b4a0c11d182b80000e829fbfe/content.htm

Best regards,

Orkun Gedik

Former Member
0 Kudos

Hi Volker,

>> online+redo log file backup

It should be online consistent backup. Because of this reason, I though that the redologs can be restored.

Best regards,

Orkun Gedik

volker_borowski2
Active Contributor
0 Kudos

Hi Orkun,

yes, they should be on the tape. But brbackup does not know "online+redologs".

This is a DB13 description.

And DB13 is not doing "online_cons" (which is a brbackup option).

It is calling "brbackup -m .....   -a ++brarchive options++"

The difference is, brbackup does not finish and rewinds the tape when the last file is written, but it calls brarchive to continue processing redologs at the very same tape position on the current tape. So the processing of the logs is logged in archSID.log and all information for retrival are saved as archive runs (tape label and tape position).

So the restore reads archSID.log to do a real redolog restore.

And for a redolog restore you need "-a" and the log numbers.

online_cons saves the redologs as well, but it logs nothing of this in archSID.log. Otherwise you would no be able to maintain two continous sets of logs on different media, because brarchive would think the first copy already being saved. So the logs are saved as additional files in this case, which you can restore with "-m" and the file name. That is why you need to specify the name to "-m", because the number would be treated as a datafile number for "-m".

I was just making the point that "backing up with brtools" and "online+redo" might be used without being precise about how the backup is taken.

Volker

Former Member
0 Kudos

>> Yes, you can. Please find the further information in the document, below;

>> http://help.sap.com/saphelp_nw70/helpdata/en/0d/d3077b4a0c11d182b80000e829fbfe/content.htm

Ok. Let me clear the situation. I wanted to say that the files can be restored by giving redolog number, not by filename, as below;

WRONG >> brrestore -a <filename>=/oracle/oraarch_new

CORRECT >> brrestore -a lognumber=/oracle/oraarch_new

So, finally the file(s) can be restored respecfully, by the backup type noted in the first message. So they will not be overwritten on existing offline redolog files.

Orkun Gedik

Answers (0)