Incremental Backup

Incremental Backup
1)usage
1@@@@incremental backup level 0.
@@@accroding to control_file_keep_time=7(assure it would not be overwrite 7 days)
@@@incremental backup do again every 7 days.
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     32
Next log sequence to archive   34
Current log sequence           34
 
@@@if plus archivelog would do two times.make archivelog to a backup piece,
@@@and original copy still be retained.
@@@delete all input => delete copy due to alter system switch logfile.
RMAN> backup incremental level 0  tablespace users plus archivelog delete all input; 
 
@@@
RMAN> list backup; 
List of Backup Sets
============================================================
BS Key  Size       Device Type Elapsed Time Completion Time    
------- ---------- ----------- ------------ -------------------
51      14.03M     DISK        00:00:01     2011-12-20 12:31:24
        BP Key: 60   Status: AVAILABLE  Compressed: NO  Tag: TAG20111220T123122
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_12_20/
o1_mf_annnn_TAG20111220T123122_7h03ww44_.bkp
  List of Archived Logs in backup set 51
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    32      1349716    2011-12-20 11:32:19 1357836    2011-12-20 12:31:21
=============================================================
52      Incr 0  9.41M      DISK        00:00:00     2011-12-20 12:31:25
        BP Key: 61   Status: AVAILABLE  Compressed: NO  Tag: TAG20111220T123125
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_12_20/
o1_mf_nnnd0_TAG20111220T123125_7h03wxg2_.bkp
  List of Datafiles in backup set 52
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  4    0  Incr 1357844    2011-12-20 12:31:25 /u01/app/oracle/oradata/orcl/users01.dbf
===============================================================
53      5.50K      DISK        00:00:01     2011-12-20 12:31:27
        BP Key: 62   Status: AVAILABLE  Compressed: NO  Tag: TAG20111220T123126
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_12_20/
o1_mf_annnn_TAG20111220T123126_7h03wzr4_.bkp
  List of Archived Logs in backup set 53
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    33      1357836    2011-12-20 12:31:21 1357847    2011-12-20 12:31:26
@@@
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     34
Next log sequence to archive   36
Current log sequence           36    @@@after backup, it increase by 2;
@@@Note:
@@@observe the result,we know there two copy archvielog.when you begin incremantal
@@@backup level 0,process would archive log first.when it is end,process would do 
@@@archive log again.
 
2@@@@concept
@@@
A full backup contains all used data file blocks.
A level 0 incremental backup is equivalent to a full backup that
has been marked as level 0.
A cumulative level 1 incremental backup contains only blocks 
modified since the last level 0 incremental backup.
A differential level 1 incremental backup contains only blocks 
modified since the last incremental backup.
 
@@@
RMAN can create multilevel incremental backups as follows:
Differential: The default type of incremental backup that backs up all blocks changed after
the most recent incremental backup at either level 1 or level 0
Cumulative: Backs up all blocks changed after the most recent backup at level 0
RMAN> BACKUP tag 'xx' INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
RMAN> BACKUP tag 'xx' INCREMENTAL LEVEL 1 DATABASE;
RMAN> BACKUP tag 'xx' INCREMENTAL LEVEL 0 DATABASE;
 
 
3@@@@block change tracking
@@@the entire data file is read during each incremental backup, 
@@@even if just a very small part of that file has changed since 
@@@the last incremental backup.
@@@more detail referencing "043 man3-page-109"
 
SQL> conn /as sysdba; 
SQL> alter database enable block change tracking using file '/u01/app/oracle/rman_change_track.f' reuse; 
[root@station60 oracle]# ls /u01/app/oracle/rman_change_track.f
@@@
RMAN> backup tag 'copy-users' as copy incremental 
level 0 tablespace users;
@@@
SQL> select creation_change#,creation_time 
from v$datafile_copy;
CREATION_CHANGE# CREATION_TIME
---------------- -------------------
         1402101 2011-12-21 11:58:13
@@@
SQL> conn /as sysdba; 
SQL> create table hr.tbig as select * from dba_source; 
@@@
RMAN> backup tag 'tbig-users' incremental level 1 tablespace users; 
RMAN> recover copy of datafile 4 with tag 'copy_users';

你可能感兴趣的:(tracing,block,Incremental,cumulative)