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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Xtrabackup全量備份
- MySQL的冷備份和熱備份概念理解(轉)MySql
- 備份集和備份片之間的關係
- MySQL運維實戰之備份和恢復(8.1)xtrabackup全量備份MySql運維
- innobackupex全備份流程圖流程圖
- 天翼云云主機快照、雲硬碟備份、雲主機備份之間的區別硬碟
- BMMySQL定時備份資料庫(全庫備份)的實現meuMySql資料庫
- mysql的冷備份與熱備份MySql
- 賦能雲HBase備份恢復 百T級別資料量備份恢復支援
- mysqldump全量備份+mysqlbinlog二進位制日誌增量備份MySql
- 全網資料備份方案
- xtrabackup備份mysql“ib_logfile0 is ofMySql
- 備份和恢復
- MySQL中如何選擇合適的備份策略和備份工具MySql
- SqlServer 備份集和備份片以及mirror的backup_set_idSQLServer
- 【Xtrabackup】Xtrabackup全備、增量備份及恢復示例
- 使用NineData實現企業級資料庫備份, 資料備份告別“拆盲盒” ?資料庫
- 詳解叢集級備份恢復:物理細粒度備份恢復
- GitLab的自動備份、清理備份與恢復Gitlab
- oracle 如何不備份已經備份的歸檔Oracle
- 備份Kubernetes和Docker方法Docker
- KunlunDB備份和恢復
- redis 備份和恢復Redis
- 初探MySQL資料備份及備份原理MySql
- Mysql備份與恢復(1)---物理備份MySql
- 備份Outlook 2016 的自動補全列表
- alias 備份
- 備份dockerDocker
- 備份命令
- 備份的優化和調整優化
- oracle資料庫備份之exp增量備份Oracle資料庫
- Mysql備份與恢復(2)---邏輯備份MySql
- ManagerDB 備份檔案管理與異地備份
- 群暉NAS備份建議及備份方式
- innobackupex命令備份全過程圖解圖解
- windows 全量+增量備份指令碼batWindows指令碼BAT
- RMAN的備份原理
- Mysqldump的備份流程MySql
- MySQLDump的備份方法MySql