0級備份和全備份的本質區別
準備:將測試環境的users表空間只讀
測試:
1、資料庫0級別備份
RMAN> backup incremental level 0 database tag 'levle0' format '/home/oracle/guo/%U';
Starting backup at 23-MAY-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/PROD1/system01.dbf
input datafile file number=00010 name=/u02/oradata/prod1/test_tbs.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/PROD1/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/PROD1/example01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/07q7mo4a_1_1 tag=LEVLE0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/PROD1/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/08q7mo5e_1_1 tag=LEVLE0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/PROD1/EXAMPLE.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/PROD1/indx.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/PROD1/TEST.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/PROD1/TOOLS.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/PROD1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/09q7mo5h_1_1 tag=LEVLE0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 23-MAY-15
Starting Control File and SPFILE Autobackup at 23-MAY-15
piece handle=/home/oracle/flash/PROD1/autobackup/2015_05_23/o1_mf_s_880500914_bp17km40_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 23-MAY-15
備份完成users表空間(只讀)順利備份
2、資料庫1級別備份
RMAN> backup incremental level 1 database tag 'level1' format '/home/oracle/guo/%U';
Starting backup at 23-MAY-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/PROD1/system01.dbf
input datafile file number=00010 name=/u02/oradata/prod1/test_tbs.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/PROD1/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/PROD1/example01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/0bq7mo93_1_1 tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/PROD1/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/0cq7mo94_1_1 tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/PROD1/EXAMPLE.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/PROD1/indx.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/PROD1/TEST.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/PROD1/TOOLS.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/PROD1/users01.dbf
skipping datafile 00004 because it has not changed
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/0dq7mo96_1_1 tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 23-MAY-15
Starting Control File and SPFILE Autobackup at 23-MAY-15
piece handle=/home/oracle/flash/PROD1/autobackup/2015_05_23/o1_mf_s_880501031_bp17o7q8_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 23-MAY-15
RMAN>
結論:資料庫0級備份是不會丟掉只讀表空間的,只有1級的備份會因為只讀表空間沒有改變所以不會去備份它。
找到官方的說法:
Full
A backup of a datafile that includes every allocated block in the file being backed up. A full backup of a datafile can be an image copy, in which case every data block is backed up. It can also be stored in a backup set, in which case datafile blocks not in use may be skipped, according to rules in Oracle Database Backup and Recovery Reference.
A full backup cannot be part of an incremental backup strategy; that is, it cannot be the parent for a subsequent incremental backup.
Incremental
An incremental backup is either a level 0 backup, which includes every block in the file except blocks compressed out because they have never been used, or a level 1 backup, which includes only those blocks that have been changed since the parent backup was taken.
A level 0 incremental backup is physically identical to a full backup. The only difference is that the level 0 backup is recorded as an incremental backup in the RMAN repository, so it can be used as the parent for a level 1 backup.
Ps:至於全備份和0級別備份另一個差異,我覺得前面的引用英文說的很清楚了,全備份不能作為0級別備份,讓1級別的備份以它為基礎進行增量備份,因為它的備份資訊裡沒有相關的增量備份資訊。
測試:
1、資料庫0級別備份
RMAN> backup incremental level 0 database tag 'levle0' format '/home/oracle/guo/%U';
Starting backup at 23-MAY-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/PROD1/system01.dbf
input datafile file number=00010 name=/u02/oradata/prod1/test_tbs.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/PROD1/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/PROD1/example01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/07q7mo4a_1_1 tag=LEVLE0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/PROD1/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/08q7mo5e_1_1 tag=LEVLE0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/PROD1/EXAMPLE.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/PROD1/indx.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/PROD1/TEST.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/PROD1/TOOLS.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/PROD1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/09q7mo5h_1_1 tag=LEVLE0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 23-MAY-15
Starting Control File and SPFILE Autobackup at 23-MAY-15
piece handle=/home/oracle/flash/PROD1/autobackup/2015_05_23/o1_mf_s_880500914_bp17km40_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 23-MAY-15
備份完成users表空間(只讀)順利備份
2、資料庫1級別備份
RMAN> backup incremental level 1 database tag 'level1' format '/home/oracle/guo/%U';
Starting backup at 23-MAY-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/PROD1/system01.dbf
input datafile file number=00010 name=/u02/oradata/prod1/test_tbs.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/PROD1/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/PROD1/example01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/0bq7mo93_1_1 tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/PROD1/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/0cq7mo94_1_1 tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/PROD1/EXAMPLE.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/PROD1/indx.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/PROD1/TEST.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/PROD1/TOOLS.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/PROD1/users01.dbf
skipping datafile 00004 because it has not changed
channel ORA_DISK_1: starting piece 1 at 23-MAY-15
channel ORA_DISK_1: finished piece 1 at 23-MAY-15
piece handle=/home/oracle/guo/0dq7mo96_1_1 tag=LEVEL1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 23-MAY-15
Starting Control File and SPFILE Autobackup at 23-MAY-15
piece handle=/home/oracle/flash/PROD1/autobackup/2015_05_23/o1_mf_s_880501031_bp17o7q8_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 23-MAY-15
RMAN>
結論:資料庫0級備份是不會丟掉只讀表空間的,只有1級的備份會因為只讀表空間沒有改變所以不會去備份它。
找到官方的說法:
Full
A backup of a datafile that includes every allocated block in the file being backed up. A full backup of a datafile can be an image copy, in which case every data block is backed up. It can also be stored in a backup set, in which case datafile blocks not in use may be skipped, according to rules in Oracle Database Backup and Recovery Reference.
A full backup cannot be part of an incremental backup strategy; that is, it cannot be the parent for a subsequent incremental backup.
Incremental
An incremental backup is either a level 0 backup, which includes every block in the file except blocks compressed out because they have never been used, or a level 1 backup, which includes only those blocks that have been changed since the parent backup was taken.
A level 0 incremental backup is physically identical to a full backup. The only difference is that the level 0 backup is recorded as an incremental backup in the RMAN repository, so it can be used as the parent for a level 1 backup.
Ps:至於全備份和0級別備份另一個差異,我覺得前面的引用英文說的很清楚了,全備份不能作為0級別備份,讓1級別的備份以它為基礎進行增量備份,因為它的備份資訊裡沒有相關的增量備份資訊。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29067253/viewspace-2124946/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 0級備份和全備份的本質區別是什麼 ?
- RMAN 全庫備份和 0級備份的區別
- Oracle RMAN中全備份與0級備份區別Oracle
- rman不做0級備份,可以直接做其他級別的incremental 備份,其本質還是先做0級備份!REM
- exp備份和rman備份的區別
- Oracle 熱備份和冷備份的區別Oracle
- 完全備份、差異備份、增量備份的區別
- 備份策略 增量備份中的差異備份:週日和週三執行0級備份,其他每天執行1級備份
- Oracle裡邏輯備份、物理備份、Rman備份的區別Oracle
- rman的level 0 1 2級備份有什麼區別?
- 認識資料庫物理備份和邏輯備份區別資料庫
- RMAN說,我能備份(3)--RMAN全庫備份和表空間備份
- 兩種增量備份的區別!
- oracle的熱備份和冷備份Oracle
- Rman備份中obsolete和expired的區別
- rman 備份 全庫
- 備份之全庫一致性備份
- TSM中備份(Backup)和歸檔(Archive)的區別Hive
- rman備份和增量備份指令碼指令碼
- Oracle冷備份和熱備份的處理Oracle
- 物理備份是以block來區別邏輯備份的(os block或oracle block) ?BloCOracle
- rman全庫備份備份歸檔日誌檔案
- RMAN備份型別 - 備份集(backupset)和映象副本(Image copy)型別
- MySQL運維實戰之備份和恢復(8.1)xtrabackup全量備份MySql運維
- Backup And Recovery User's Guide-RMAN備份概念-備份集-備份集和備份片GUIIDE
- RMan 備份incremental與cumulative的區別REM
- INNOBACKUPEX的全備和增量備份恢復學習筆記筆記
- innobackupex全備份流程圖流程圖
- rman 全備份指令碼指令碼
- 原創 Rman備份中obsolete和expired的區別
- mysqldump 全量和增量備份指令碼MySql指令碼
- Backup And Recovery User's Guide-備份RMAN備份-備份保留期對備份的備份的影響GUIIDE
- Oracle冷備份級冷備份的不完全恢復Oracle
- 備份集和備份片之間的關係
- MySQL的冷備份和熱備份概念理解(轉)MySql
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-多級增量備份GUIIDE
- RMAN備份中catalog和nocatalog區別[轉]
- Oracle RMAN備份中catalog和nocatalog區別Oracle