الانتقال إلى المحتوى

Tag In Rman Backup& Backup Format


mohamed rabiee

Recommended Posts

 

               RMAN BACKUP FORMAT & TAG

 

RMAN BACKUP FORMAT

 

 format very useful for daily backup & rman schedule backup*

  save backup in separate destination (2copy of backup by configuring (CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT)

 

 

the format percentages specified the OS file name

 

%a: :It refer to Id Of Your DB

%Y: Specifies the year in this format: YYYY.

%d : put the name of SID

%D : put the current day

%M :put current month

%Y :put current year

%U :put a sequential number

%s :backup set number. (Unique for controlfile lifetime)

%T: Specifies the year, month, and day in the Gregorian calendar in this format: YYYYMMDD

%p :Specifies the piece number within the backup set

 

طبعا في انواع تانيه ممكن تدور  عليهم علي حسب احتياجك

 

 

 ;'RMAN> backup database format'/ora01/app/oracle/flash_recovery_area/ORA11G/backupset/bk_%D_%d_%p_%s_%T.bak

 

here i mention path and format

 

 

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

27      Full    1.11G      DISK        00:01:17     11-OCT-17     

        BP Key: 27   Status: AVAILABLE  Compressed: NO  Tag: TAG20171011T023749

        Piece Name: /ora01/app/oracle/flash_recovery_area/ORA11G/backupset/bk_11_ORA11G_1_33_20171011.bak

  List of Datafiles in backup set 27

  File LV Type Ckp SCN    Ckp Time  Name

 

%bk constant name

%D:day of month (11_

%d : SID ORA11G_

%p:the piece number  1_

%s :backup set number 33_

%(T :Specifies the year, month, and day in the Gregorian calendar in this  (20171011_

 

 

Note if we backup datafile use .dbf instead of .dbk

 

 

 

 

 

 

 

Tag in Rman

 

tag meaning you give your db backup name for simplify  restore operation if you want to restore from specific backup like (before update - before patch)

if you not use tag database automatic naming the tag by using db timezone

 

 

-----Without Tag------

 

RMAN> backup database;

 

Starting backup at 11-OCT-17

 

--------

;RMAN> list backup

 

 

List of Backup Sets

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

 

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

21      Full    9.39M      DISK        00:00:00     11-OCT-17     

        BP Key: 22   Status: AVAILABLE  Compressed: NO  Tag: TAG20171011T011924

        Piece Name: /ora01/app/oracle/flash_recovery_area/ORA11G/autobackup/2017_10_11/o1_mf_s_957057564_dxvo0dhn_.bkp

  SPFILE Included: Modification time: 11-OCT-17

  SPFILE db_unique_name: ORA11G

  Control File Included: Ckp SCN: 2719906      Ckp time: 11-OCT-17

 

here iam not using any tag

(TAG20171011T011924)

 

 

USING TAG

 

;RMAN> backup database tag BEFORE_UPDATE

Starting backup at 11-OCT-17

 

...

 ;RMAN> list backup

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

22      Full    1.09G      DISK        00:01:29     11-OCT-17     

        BP Key: 19   Status: AVAILABLE  Compressed: NO  Tag: BEFORE_UPDATE

        Piece Name: /ora01/app/oracle/flash_recovery_area/ORA11G/backupset/2017_10_11/o1_mf_nnndf_BEFORE_CLEANUP_dxvnm05h_.bkp

  List of Datafiles in backup set 19

  File LV Type Ckp SCN    Ckp Time  Name

 

here you can use your backup(BEFORE_UPDATE) in restore if any pb occurred after any update

 

;'RMAN> restore database from TAG='BEFORE_UPDATE

 

تم تعديل بواسطة mohamed rabiee
رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية