1 2 Previous Next 15 Replies Latest reply: Jan 31, 2013 12:21 PM by ngilbert RSS

    RMAN Duplicate with backup pieces in new location (11gR2)

    ngilbert
      Recovery catalog, target, and auxiliary DBs are all 11.2.0.3

      The location of the backups on the target DB is not identical on the auxiiliary (and I will not be able to align the folder structures).

      On target (source), backups are in: /server1logs/fast_recovery_area/DB1/backupset/<date>/<bkps>
      On auxiliary, backups will be in: /u01/app/oracle/fast_recovery_area/DB1/backupset/<date>/bkps

      I copied all of teh backup sets from target to auxiliar in folder structure above, followed prereqs for auxiliary DB (creating password, pfile, etc.) and connected with:
      rman target sys/pw@source_db CATALOG cat/pw@recovery_catalog auxiliary / (I am on the auxiliary DB box)

      Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 29 15:56:41 2013

      Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

      connected to target database: source_db(DBID=543581301)
      connected to recovery catalog database
      connected to auxiliary database: mynewdb (not mounted)

      So far, so good - I realize, however, that RMAN doesn't know about my local copies of the backups. My understandning is that I need to catalog the copies themselves but when I try:
      RMAN> CATALOG START WITH '/u01/app/oracle/fast_recovery_area/mynewdb;

      searching for all files that match the pattern /u01/app/oracle/fast_recovery_area/mynewdb
      no files found to be unknown to the database

      RMAN> CATALOG RECOVERY AREA;

      searching for all files in the recovery area
      no files found to be unknown to the database

      RMAN> CATALOG DB_RECOVERY_FILE_DEST;

      searching for all files in the recovery area
      no files found to be unknown to the database
        • 1. Re: RMAN Duplicate with backup pieces in new location (11gR2)
          mseberg
          Hello;

          I don't have a document for exactly what you ask. However back in August somebody wanted to restore to a different server with different structure NOCATALOG.

          This I have step by step :

          http://www.visi.com/~mseberg/rman/restore_database_without_catalog.html

          I also have active duplicate with different structure :


          http://www.visi.com/~mseberg/rman/diff_database_duplicating.html

          Maybe these will work for you.

          Best Regards

          mseberg
          • 2. Re: RMAN Duplicate with backup pieces in new location (11gR2)
            Hemant K Chitale
            You should be running
            CATALOG START WITH ' /u01/app/oracle/fast_recovery_area/DB1/backupset/<date>/bkps' ;
            Hemant K Chitale
            • 3. Re: RMAN Duplicate with backup pieces in new location (11gR2)
              mseberg
              Hemant;

              I'm beginning to think you are Superman!

              Best Regards

              mseberg
              • 4. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                Hemant K Chitale
                No, not Superman. Just more observant in this thread.

                There have been other threads where I haven't noticed information posted by the original poster and tendered inadequate advice.

                Hemant K Chitale
                • 5. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                  ngilbert
                  Hi Hermant -

                  [oracle@mynewdb]$ ls -ltr /u01/app/oracle/fast_recovery_area/mynewdb/backupset/2013_01_29/
                  total 47992
                  -rw-r----- 1 oracle oinstall 24248320 Jan 29 15:03 o1_mf_nnnd1_mynewdb_INC_LEVEL_0_8jhkz05w_.bkp
                  -rw-r----- 1 oracle oinstall 24787968 Jan 29 15:03 o1_mf_annnn_mynewdb_INC_LEVEL_0_8jhlbhfb_.bkp

                  ***--> Below I am connected to the target (source DB, not mynewdb), catalog, and auxiliary (mynewdb) <- please note that while I can connect to mynewdb as the target, it lacks a controlfile so there is little I can do with it....

                  RMAN> CATALOG START WITH '/u01/app/oracle/fast_recovery_area/mynewdb/backupset/2013_01_29/';

                  searching for all files that match the pattern /u01/app/oracle/fast_recovery_area/mynewdb/backupset/2013_01_29/
                  no files found to be unknown to the database

                  I believe CATALOG is failing to find new files as my rman target is not the new DB, but the source DB

                  I feel like the problem is that I am trying to do a new RMAN DUPLICATE - as such, I do not have a control file yet for the duplicate database (DUPLICATE itself will restore the control file, but only if its aware of where the backup pieces are, which requires me to CATALOG them on the new server, but I cannot CATALOG without a controlfile....)

                  Note that I have currently abandoned using DUPLICATE and instead I am just going to use the usual RMAN commands to restore the controlfile, after which I believe I will be able to CATALOG and restore the DB as whole, I just had my mind set on using DUPLICATE (for the first time) and figured I could do it in this situation but it looks like unless the backup locations are identical in the source and auxiliary, duplicate is not supported...

                  Edited by: ngilbert on Jan 30, 2013 8:52 AM

                  Edited by: ngilbert on Jan 30, 2013 8:57 AM
                  • 6. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                    ngilbert
                    Hi Mmseberg - thanks for the info - it looks like for a normal (not active) DUPLICATE I will need the backup files in the same location as the source. As I note from your blog post, you use the same method I am using now (not DUPLICATE, just usual RMAN restore controlfile, recatalog, restore).

                    Very helpful post on active duplication, however, I will read more on this topic.
                    • 7. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                      ngilbert
                      Sure enough, once I restored the controlfile from the backup piece and connected with the mynewdb as the target:
                      RMAN> CATALOG RECOVERY AREA;

                      Starting implicit crosscheck backup at 30-JAN-13
                      allocated channel: ORA_DISK_1
                      channel ORA_DISK_1: SID=19 device type=DISK
                      Crosschecked 39 objects
                      Finished implicit crosscheck backup at 30-JAN-13

                      Starting implicit crosscheck copy at 30-JAN-13
                      using channel ORA_DISK_1
                      Finished implicit crosscheck copy at 30-JAN-13

                      searching for all files in the recovery area
                      cataloging files...
                      cataloging done

                      List of Cataloged Files
                      =======================
                      File Name: /u01/app/oracle/fast_recovery_area/mynewdb/backupset/2013_01_25/o1_mf_nnnd0_mynewdb_FULL_LEVE_0_8j5gybn8_.bkp
                      File Name: /u01/app/oracle/fast_recovery_area/mynewdb/backupset/2013_01_25/o1_mf_annnn_mynewdb_FULL_LEVE_0_8j5jmm4c_.bkp
                      File Name: /u01/app/oracle/fast_recovery_area/mynewdb/backupset/2013_01_25/o1_mf_annnn_BACKUP_mynewdb_CS_0_8j5m51dh_.bkp



                      So I guess the lesson learned for me is that a non-active DUPLICATE will not work unless backup pieces are in an identical location on the source and auxiliary... At least that's what it appears
                      • 8. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                        rcc50886
                        Can you try with "SET DBID" and see what happens:
                        rman target sys/pw@source_db CATALOG cat/pw@recovery_catalog auxiliary / (I am on the auxiliary DB box)
                        
                        Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 29 15:56:41 2013
                        
                        Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
                        
                        connected to target database: source_db(DBID=543581301)
                        connected to recovery catalog database
                        connected to auxiliary database: mynewdb (not mounted)
                        
                        RMAN> set DBID=543581301;
                        RMAN> Catalog start with /u01/app/oracle/fast_recovery_area/mynewdb/backupset/2013_01_25/ 
                        • 9. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                          Iordan Iotzov
                          In 11gR2 (the version you are using), you can run DUPLICATE and specify the location of your files - the BACKUP LOCATION option. You cannot be connected to the target when you do that, but that’s usually not a big problem.

                          Iordan Iotzov
                          http://iiotzov.wordpress.com/
                          • 10. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                            ngilbert
                            Ahhh - cool, thanks Iordan - unfortunately I'm not in a position right now to test this as I needed to commit to a conventional restore due to time constraints, but will try to use this method next time.
                            • 11. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                              ngilbert
                              Ok, so the conventional RMAN restore failed (I'm an amateur, for some reason controlfile was restoring to the wrong location in spite of OMF and RESOTRE DATABASE was only restoring the incremental level 0 from a week ago in spite of the fact that all subsequent level 1s and archive logs are cataloged and were copied to target server) so I'm retrying DUPLICATE using the BACKUP LOCATION available in 11g.

                              Sorry to reopen, but I'm now getting this error:
                              [oracle@telmasterdb mynewdb]$ rman

                              Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jan 30 12:55:29 2013

                              Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

                              RMAN> connect auxiliary /

                              connected to auxiliary database: mynewdb(not mounted)

                              RMAN> connect catalog rmancatalog/password@RC

                              connected to recovery catalog database

                              RMAN> DUPLICATE DATABASE TO mynewdb
                              2> SPFILE
                              3> BACKUP LOCATION '/u01/app/oracle/fast_recovery_area/mynewdb'
                              4> NOFILENAMECHECK;

                              Starting Duplicate Db at 30-JAN-13
                              RMAN-00571: ===========================================================
                              RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                              RMAN-00571: ===========================================================
                              RMAN-03002: failure of Duplicate Db command at 01/30/2013 12:56:23
                              RMAN-05501: aborting duplication of target database
                              RMAN-05543: DUPLICATE without TARGET connection requires that DATABASE is specified


                              Database is clearly specified in the command (DUPLICATE DATABASE TO mynewdb) so is this the right error?
                              • 12. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                                ngilbert
                                Was able to try the solution provided but unfrotunately still having problems.
                                • 13. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                                  mseberg
                                  Hello;

                                  I should probably read every detail of the thread before I post this, but when I do a similar thing ( duplicate for standby ) my connect is :
                                  rman target sys/password@PRIMARY auxiliary /
                                  My notes for that are here :

                                  http://www.visi.com/~mseberg/duprman2.html

                                  I know its not the same thing, but I'm thinking only the duplicate command would be different.

                                  Best Regards

                                  mseberg
                                  • 14. Re: RMAN Duplicate with backup pieces in new location (11gR2)
                                    Hemant K Chitale
                                    True. You need a controlfile to CATALOG the backuppieces.

                                    Have you looked at the paragraphs under the section "Making Disk Backups Accessible to the Auxiliary Instance" http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#sthref1815

                                    Hemant K Chitale
                                    1 2 Previous Next