1 2 Previous Next 23 Replies Latest reply: Apr 2, 2014 5:45 AM by GTS (DBA) RSS

    Rman backup

    GTS (DBA)


      Hi All ;


      I have a basic question.

      When taking backup , Why oracle goes with mulitiple backup sets.


       

      RMAN> backup database;

      Starting backup at 30-MAR-14

      using channel ORA_DISK_1

      channel ORA_DISK_1: starting full datafile backupset

      channel ORA_DISK_1: specifying datafile(s) in backupset

      input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/users02.dbf

      input datafile fno=00007 name=/u03/undotbs01.dbf

      input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf

      input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf

      input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf

      input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf

      channel ORA_DISK_1: starting piece 1 at 30-MAR-14

      channel ORA_DISK_1: finished piece 1 at 30-MAR-14

      piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_03_30/o1_mf                                              _nnndf_TAG20140330T070331_9mgx3cf0_.bkp tag=TAG20140330T070331 comment=NONE

      channel ORA_DISK_1: backup set complete, elapsed time: 00:02:35

      channel ORA_DISK_1: starting full datafile backupset

      channel ORA_DISK_1: specifying datafile(s) in backupset

      including current control file in backupset

      including current SPFILE in backupset

      channel ORA_DISK_1: starting piece 1 at 30-MAR-14

      channel ORA_DISK_1: finished piece 1 at 30-MAR-14

      piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_03_30/o1_mf                                              _ncsnf_TAG20140330T070331_9mgx88nk_.bkp tag=TAG20140330T070331 comment=NONE

      channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

      Finished backup at 30-MAR-14

       

       


      RMAN> list backup;

       

      List of Backup Sets

      ===================

      BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

      12      Full    872.60M    DISK        00:02:32     30-MAR-14

              BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: TAG20140330T070331

              Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_03_30/o1_mf_nnndf_TAG20140330T070331_9mgx3cf0_.bkp

        List of Datafiles in backup set 12

        File LV Type Ckp SCN    Ckp Time  Name

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

        1       Full 890690     30-MAR-14 /u01/app/oracle/oradata/orcl/system01.dbf

        3       Full 890690     30-MAR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf

        4       Full 890690     30-MAR-14 /u01/app/oracle/oradata/orcl/users01.dbf

        5       Full 890690     30-MAR-14 /u01/app/oracle/oradata/orcl/example01.dbf

        6       Full 890690     30-MAR-14 /u01/app/oracle/oradata/orcl/users02.dbf

        7       Full 890690     30-MAR-14 /u03/undotbs01.dbf

       

       

      BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

      13      Full    6.89M      DISK        00:00:02     30-MAR-14

              BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: TAG20140330T070331

              Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_03_30/o1_mf_ncsnf_TAG20140330T070331_9mgx88nk_.bkp

        Control File Included: Ckp SCN: 890772       Ckp time: 30-MAR-14

        SPFILE Included: Modification time: 30-MAR-14

       

       

      $ pwd

      /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_03_30

      [oracle@oel5 2014_03_30]$ ls -l

      total 901516

      -rw-r----- 1 oracle oinstall   7241728 Mar 30 07:06 o1_mf_ncsnf_TAG20140330T070331_9mgx88nk_.bkp

      -rw-r----- 1 oracle oinstall 914997248 Mar 30 07:06 o1_mf_nnndf_TAG20140330T070331_9mgx3cf0_.bkp

       

       

      >>> Questions :


      1. how can i take backup entire database into single backup set ?


      2. when taking backup i think only tag name is sufficient , i don't want to keep name following below.

       

      o1_mf_nnndf_TAG20140330T070331_9mgx3cf0_.bkp , o1_mf_ncsnf_TAG20140330T070331_9mgx88nk_.bkp

       

      3. Cam i use only tag name - Is it recommended ?

        • 1. Re: Rman backup
          teits

          hello Gts,

           

          1. you have enable auto backup of controlfile. the second backup piece belong to control file.

           

          Just FYI: you can also check MAXPIECESIZE parameter: it specifies maximum size of backup piece.

           

          2.you can specify the tag name, which is recommended.

          e.g.

          BACKUP DATABASE

          TAG gts_month_backup;

           

          3.yes  - Is it recommended

           

          HTH

          Tobi

          • 2. Re: Rman backup
            GTS (DBA)

            Hi Tobi ;

             

            What i think , By default rman takes all files except archived logs.


            but you told

            you have enable auto backup of controlfile. the second backup piece belong to control file.

            1)  Do u mean  my  rman  backup did NOT include  spfile. ?

            • 3. Re: Rman backup
              teits

              NO, Spfile included in the same backup piece with controlfile.

              • 4. Re: Rman backup
                Paul M.

                1)  Do u mean  my  rman  backup did NOT include  spfile. ?

                From your original post :

                 

                  Control File Included: Ckp SCN: 890772       Ckp time: 30-MAR-14

                  SPFILE Included: Modification time: 30-MAR-14

                • 5. Re: Rman backup
                  GTS (DBA)

                  Hello tobi ;

                   

                  My stright question is

                   

                  1) Can i  force rman to take  backup entire database in single backup set ?

                   

                  if so , please provide the steps.

                   

                  we can   take  entire database backup as image  copies

                  2)Backup set or image copy  , which is best one ?

                  • 6. Re: Rman backup
                    oscrub

                    1. As mentioned by teits, you can use MAXPIECESIZE to define the maximum size of each piece in a backupset. The documentation mentions that an internal algorithm determines the number of files in each backupset, I remember seeing it in the documentation though I can't find the exact link for it at the moment.

                     

                     

                    2. Image copies are direct physical copies of the database files, similar to doing a cp from the operating system. Since they are in a non-RMAN format, they can used for other restore and recovery operations outside of Oracle. Backupsets only back up the used blocks in the database, and therefore are of smaller size. They provide more options for flexibility in terms of backing up to multiple locations, eg. it allows you to limit file pieces to 20MB on each tape channel with backup sets having a maxsize of 5GB.

                    There isn't really a 'best' one, as each method has it's own pros and cons depending on your backup and recovery goals and needs.

                    • 7. Re: Rman backup
                      Hemant K Chitale

                      You can't force the controlfile autobackup to be in the same backupset as the database.

                      You can disable controlfile autobackup completely.  In that case, Oracle will backup the controlfile with the system datafile (but will not backup the spfile)

                       

                      Note : As your database grows (larger files, more datafiles),  you will, over time, see the database backup itself being split across multiple backupsets.  It will also be the case if you use multiple channels to backup the database.

                       

                      Hemant K Chitale

                      • 8. Re: Rman backup
                        GTS (DBA)

                        Hi Hemanth ;

                         

                        So you are saying  when taking entire database backup  ' atleast we can see two backup sets' - is it ?

                         

                        one for  all physical data  files.  Another one for control file.


                        Anyhow i have another one doubt , What means  'backup current controlfile'


                        Consider i have 3 control files , i am seeing some rman commands as  ' backup current controlfile '

                        I think all control files are active during database running stage.


                        Does oracle think Only one control file is active rest of them are inactive ?- i don't thinks so.


                         

                        • 9. Re: Rman backup
                          Hemant K Chitale

                          >So you are saying  when taking entire database backup  ' atleast we can see two backup sets' - is it ?

                          IF you have controlfile autobackup on.  Else, the controlfile backup goes with the system datafile backup.

                           

                          >Consider i have 3 control files

                          No, you have 1 controlfile but 3 copies of it (multiplexed).  So, current controlfile is the current image of the controlfile taken from any one of the 3 copies.

                           

                          Hemant K Chitale

                           

                          • 10. Re: Rman backup
                            GTS (DBA)

                            Hi  Hemanth ;

                             

                            Thanks for your quick answers. I have a last question  here .

                             

                            RMAN> show all;

                             

                             

                            RMAN configuration parameters are:

                            CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

                            CONFIGURE BACKUP OPTIMIZATION OFF; # default

                            CONFIGURE DEFAULT DEVICE TYPE TO DISK;

                            CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

                            CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

                            CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

                            CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

                            CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

                            CONFIGURE MAXSETSIZE TO UNLIMITED; # default

                            CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

                            CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

                            CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

                            CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_orcl.f'; # default

                             

                             

                            From tobi's answer  -->  We can use MAXPIECESIZE to define the maximum size of each piece in a backupset.

                             

                             

                            I cannot find  'how can i force  rman  to set bckup piece size for data files ?   

                            RMAN> backup format='/u02/rmanbkp/orcl_%t.bkp' database;

                            Starting backup at 31-MAR-14

                            using target database control file instead of recovery catalog

                            allocated channel: ORA_DISK_1

                            channel ORA_DISK_1: sid=136 devtype=DISK

                            channel ORA_DISK_1: starting full datafile backupset

                            channel ORA_DISK_1: specifying datafile(s) in backupset

                            input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/users02.dbf

                            input datafile fno=00007 name=/u03/undotbs01.dbf

                            input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf

                            input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf

                            input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf

                            input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf

                            channel ORA_DISK_1: starting piece 1 at 31-MAR-14

                            channel ORA_DISK_1: finished piece 1 at 31-MAR-14

                            piece handle=/u02/rmanbkp/orcl_843648164.bkp tag=TAG20140331T104244 comment=NONE

                            channel ORA_DISK_1: backup set complete, elapsed time: 00:03:57

                            channel ORA_DISK_1: starting full datafile backupset

                            channel ORA_DISK_1: specifying datafile(s) in backupset

                            including current control file in backupset

                            including current SPFILE in backupset

                            channel ORA_DISK_1: starting piece 1 at 31-MAR-14

                            channel ORA_DISK_1: finished piece 1 at 31-MAR-14

                            piece handle=/u02/rmanbkp/orcl_843648401.bkp tag=TAG20140331T104244 comment=NONE

                            channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

                            Finished backup at 31-MAR-14

                             

                            Please have a

                            • 11. Re: Rman backup
                              Hemant K Chitale

                              Curious.

                              You have :

                              >CONFIGURE CONTROLFILE AUTOBACKUP OFF;

                              Yet, we see a c ontrolfile + spfile backup.

                               

                              MAXPIECESIZE is specified with the ALLOCATE CHANNEL.

                               

                               

                              Hemant K Chitale

                              • 12. Re: Rman backup
                                ANURAGDBA INDIA

                                Hello

                                 

                                check blog

                                anuragkumarjoy.blogspot.in

                                 

                                in rman backup /recovery

                                 

                                u do with tag name during rman backup commnad

                                • 13. Re: Rman backup
                                  GTS (DBA)

                                  Hi Hemanth ;

                                   

                                  I am trying to take backup database by setting maxpiecesize=100;

                                  but i got error.

                                   

                                  RMAN> allocate channel ORA_DISK_1 type disk maxpiecesize=100m;

                                   

                                  RMAN-00571: ===========================================================

                                  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

                                  RMAN-00571: ===========================================================

                                  RMAN-00558: error encountered while parsing input commands

                                  RMAN-01009: syntax error: found "identifier": expecting one of: "for"

                                  RMAN-01008: the bad identifier was: ORA_DISK_1

                                  RMAN-01007: at line 1 column 18 file: standard input

                                   

                                   

                                  RMAN> allocate channel d1 type disk maxpiecesize=100m;

                                   

                                  RMAN-00571: ===========================================================

                                  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

                                  RMAN-00571: ===========================================================

                                  RMAN-00558: error encountered while parsing input commands

                                  RMAN-01009: syntax error: found "identifier": expecting one of: "for"

                                  RMAN-01008: the bad identifier was: d1

                                  RMAN-01007: at line 1 column 18 file: standard input

                                  • 14. Re: Rman backup
                                    KarK

                                    Hi,

                                     

                                    You can't specify allocate command like that. Specify it inside the RUN command like below:

                                     

                                    run

                                    {

                                    allocate channel ORA_DISK_1 type disk maxpiecesize=100m;

                                    backup format='/u02/rmanbkp/orcl_%t.bkp' database;

                                    }

                                    1 2 Previous Next