一个0级别增量备份小demo
connect target sys/oracle@testdb run{ allocate channel d1 device type disk; backup as compressed backupset incremental level=0 format='/home/oracle/logmnr/rmanback/inc0_%d_%U' tag='inc0' channel=d1 database; backup as compressed backupset format='/home/oracle/logmnr/rmanback/arch_%d_%U' tag='arch' channel=d1 archivelog all delete input; backup as compressed backupset format='/home/oracle/logmnr/rmanback/backup.ctl' tag='ctl' channel=d1 current controlfile reuse; }
11203ora-> rman cmdfile=/home/oracle/logmnr/lev0.rcv log=/home/oracle/logmnr/rmanback/rman.log append RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 11203ora->
11203ora-> cd rmanback/ 11203ora-> ll total 367912 -rw-r----- 1 oracle oinstall 18173440 Jul 29 12:22 arch_TESTDB_6fofv38k_1_1 -rw-r----- 1 oracle oinstall 1179648 Jul 29 12:22 backup.ctl -rw-r----- 1 oracle oinstall 357376000 Jul 29 12:22 inc0_TESTDB_6eofv34u_1_1 -rw-r--r-- 1 oracle oinstall 4143 Jul 29 12:22 rman.log 11203ora->
11203ora-> cat rman.log Recovery Manager: Release 11.2.0.3.0 - Production on Mon Jul 29 12:20:42 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. RMAN> connect target * 2> run{ 3> allocate channel d1 device type disk; 4> backup as compressed backupset 5> incremental level=0 6> format='/home/oracle/logmnr/rmanback/inc0_%d_%U' 7> tag='inc0' 8> channel=d1 9> database; 10> 11> backup as compressed backupset 12> format='/home/oracle/logmnr/rmanback/arch_%d_%U' 13> tag='arch' 14> channel=d1 15> archivelog all delete input; 16> 17> backup as compressed backupset 18> format='/home/oracle/logmnr/rmanback/backup.ctl' 19> tag='ctl' 20> channel=d1 21> current controlfile reuse; 22> } 23> connected to target database: TESTDB (DBID=2603690985) using target database control file instead of recovery catalog allocated channel: d1 channel d1: SID=143 device type=DISK Starting backup at 2013/07/29 12:20:45 channel d1: starting compressed incremental level 0 datafile backup set channel d1: specifying datafile(s) in backup set input datafile file number=00002 name=/u01/app/oracle/oradata/testdb/sysaux01.dbf input datafile file number=00001 name=/u01/app/oracle/oradata/testdb/system01.dbf input datafile file number=00005 name=/u01/app/oracle/oradata/testdb/example01.dbf input datafile file number=00006 name=/u01/app/oracle/oradata/testdb/DATACENTER01.dbf input datafile file number=00007 name=/u01/app/oracle/oradata/testdb/rman_ts01.dbf input datafile file number=00011 name=/u01/app/oracle/oradata/testdb/ts_perf_01.dbf input datafile file number=00003 name=/u01/app/oracle/oradata/testdb/undotbs01.dbf input datafile file number=00008 name=/u01/app/oracle/oradata/testdb/myundotbs01.dbf input datafile file number=00004 name=/u01/app/oracle/oradata/testdb/users01.dbf input datafile file number=00009 name=/u01/app/oracle/oradata/testdb/testtbs01.dbf input datafile file number=00010 name=/u01/app/oracle/oradata/testdb/testtbs02.dbf channel d1: starting piece 1 at 2013/07/29 12:20:46 channel d1: finished piece 1 at 2013/07/29 12:22:41 piece handle=/home/oracle/logmnr/rmanback/inc0_TESTDB_6eofv34u_1_1 tag=INC0 comment=NONE channel d1: backup set complete, elapsed time: 00:01:55 Finished backup at 2013/07/29 12:22:41 Starting backup at 2013/07/29 12:22:43 current log archived channel d1: starting compressed archived log backup set channel d1: specifying archived log(s) in backup set input archived log thread=1 sequence=136 RECID=131 STAMP=822039154 input archived log thread=1 sequence=137 RECID=132 STAMP=822039158 input archived log thread=1 sequence=138 RECID=133 STAMP=822054163 channel d1: starting piece 1 at 2013/07/29 12:22:44 channel d1: finished piece 1 at 2013/07/29 12:22:47 piece handle=/home/oracle/logmnr/rmanback/arch_TESTDB_6fofv38k_1_1 tag=ARCH comment=NONE channel d1: backup set complete, elapsed time: 00:00:03 channel d1: deleting archived log(s) archived log file name=/u01/app/oracle/fast_recovery_area/TESTDB/archivelog/2013_07_29/o1_mf_1_136_8zcdvgxf_.arc RECID=131 STAMP=822039154 archived log file name=/u01/app/oracle/fast_recovery_area/TESTDB/archivelog/2013_07_29/o1_mf_1_137_8zcdvopb_.arc RECID=132 STAMP=822039158 archived log file name=/u01/app/oracle/fast_recovery_area/TESTDB/archivelog/2013_07_29/o1_mf_1_138_8zcvjm9r_.arc RECID=133 STAMP=822054163 Finished backup at 2013/07/29 12:22:47 Starting backup at 2013/07/29 12:22:48 channel d1: starting compressed full datafile backup set channel d1: specifying datafile(s) in backup set including current control file in backup set channel d1: starting piece 1 at 2013/07/29 12:22:49 channel d1: finished piece 1 at 2013/07/29 12:22:50 piece handle=/home/oracle/logmnr/rmanback/backup.ctl tag=CTL comment=NONE channel d1: backup set complete, elapsed time: 00:00:01 Finished backup at 2013/07/29 12:22:50 Starting Control File and SPFILE Autobackup at 2013/07/29 12:22:50 piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/autobackup/2013_07_29/o1_mf_s_822054170_8zcvjv9n_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 2013/07/29 12:22:51 released channel: d1 Recovery Manager complete. 11203ora->