This discussion is archived
9 Replies Latest reply: Jul 6, 2012 9:54 AM by jgarry RSS

Cold backup with online redo logs

905444 Newbie
Currently Being Moderated
I am working on 10G in AIX for a single instance
It is just a general db backup & restore question, but I have something confused.

I am going to perform a cold backup with my ARCHIVELOG database.
No wonder why I perform a cold backup because it is a testing database which can suffer from data lost and down time during backup.
I read some guides. They all mentioned to backup all the datafiles and control files.
During the restoration, I have to copy all the backed up datafiles and control files to the default location.
Then Startup mount;
The last step before open the database is recover database until cancel;
For the acknowledgement, I have to do the command of recover database, because the online redo logs were not backed up, thus we have to recover it in order to reset the redo logs.
For my question,Would I be able to skip the command of recover database, then directly startup the database if I have backed up the online redo logs and copy the default location during the restoration?
However, I read many documents which mention that it is not suggested to backup the online redo logs. Is it just the case which ONLY applied in hot backup? Do you all think that for my case, cold backup for online redo logs is recommended?

Thanks all
  • 1. Re: Cold backup with online redo logs
    asifkabirdba Guru
    Currently Being Moderated
    For my question,Would I be able to skip the command of recover database, then directly startup the database if I have backed up the online redo logs and copy the default location during the restoration?


    Ans: Yes, if you backed up all the datafiles + controlfiles + online redo log files and all the path is same then you need to just startup the database when restoring. But you need to shutdown the database using shutdown immediate and then take the backup of datafile , controlfile and redo log files.


    Regards
    Asif Kabir
  • 2. Re: Cold backup with online redo logs
    KuljeetPalSingh Guru
    Currently Being Moderated
    The last step before open the database is recover database until cancel;
    Since its cold backup and if you've to open the database without doing recovery ,perform false recovery,step below.

    recover database noredo;

    The NOREDO options is required if redo logs are not available. If you do not specify NOREDO when recovering a NOARCHIVELOG database, then RMAN ends recovery and issues an error
  • 3. Re: Cold backup with online redo logs
    MahirM.Quluzade Guru
    Currently Being Moderated
    Second name is shutdown immediate is shutdown database clearly, means if database shutting down with immediate then all online redo logs applied to database and cleared.
    you not need backup any online redo log files. After restore cold backup you not need create any online redo log again. Becouse oracle create all redo log files automatically when database opened.

    Regards
    Mahir M. Quluzade
  • 4. Re: Cold backup with online redo logs
    905444 Newbie
    Currently Being Moderated
    Second name is shutdown immediate is shutdown database clearly, means if database shutting down with immediate then all online redo logs applied to database and cleared.
    you not need backup any online redo log files. After restore cold backup you not need create any online redo log again. Becouse oracle create all redo log files >automatically when database opened.
    Do you mean I did not require to backup the redo log and perform the command of "recover database;" at all if I issued the shutdown immediate?
    Thanks
  • 5. Re: Cold backup with online redo logs
    MahirM.Quluzade Guru
    Currently Being Moderated
    Yes, you not need backup after shutdown immediate database. this backup is consistent backup of database.
    What means consistent ? All of changes applied all data files, all of data files SCN same.

    If you use RMAN for backup database, then RMAN backup datafiles, controlfile, archived redo log, spfile. not any Online Redo log
    Why? becouse not need :)

    Edited by: Mahir M. Quluzade on Jul 5, 2012 12:47 PM
  • 6. Re: Cold backup with online redo logs
    anand prakash - oracle Pro
    Currently Being Moderated
    Hi,

    read the reply from Hemant ==> Re: restore in noarchive

    Anand
  • 7. Re: Cold backup with online redo logs
    jgarry Guru
    Currently Being Moderated
    I am at odds with Hemant, and in favor of the standard advice not to back up redo logs. Why? Because it doesn't matter that you know what you are doing, the junior dba doing the production restore in the middle of the night for the first time will overwrite the redo preventing a complete recovery, not really understanding the difference between restoration and recovery - if all the files were copied, they should all be copied back, eh? It's really a matter of standard and proper procedure rather than a technical possibility.

    If you do backup redo (and I agree that there are situations where it makes sense, I've done it too), be sure and have documented procedures being explicit about it.

    Edit: And never forget, those test databases are some developers production.

    Edited by: jgarry on Jul 5, 2012 4:32 PM
  • 8. Re: Cold backup with online redo logs
    Dude! Guru
    Currently Being Moderated
    jgarry wrote:
    Edit: And never forget, those test databases are some developers production.
    Absolutely true according to my experience. Loosing the work of a payed developer is just as bad as loosing the work of a production system and may even be worse because it may not be possible to re-enter missing data into the system.

    I think a cold backup is only suitable on special occasions, for instance, to relocate/copy the database to a different storage media, or if the database doesn't change or if loosing changes is absolutely irrelevant. Otherwise, put the database into archivelog mode and do a hot backup. After that you will also have alternative options which can make the restore and recovery of the database very easy and efficient, like flashback database, etc. but it will take substantial additional disk space.
  • 9. Re: Cold backup with online redo logs
    jgarry Guru
    Currently Being Moderated
    I think the OP is wanting to make a "gold copy" of the db for his testing purposes, to go back to a particular known stage, which is another special case. My experience has been, there are more schemata variants for the various purposes of development, testing and data snapshots than the original production, and never enough hosts, so there is some mixture of multiple databases and schemata. The application requirements and metadata changes wind up making more sense to use transportable tablespaces or expdp/impdp plus update scripts. But those details are really site specific, and someone needs to sign off on each of the service levels.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points