RMAN 增量备份

增量备份的方式
 1.differential 差异备份 认同同级备份.
 2.cumulative 累积增量备份 不认同同级备份 优点:恢复时不需要读取过多的备份集)

[oracle@localhost ~]$ mkdir -pv /home/oracle/db_bak

[oracle@localhost ~]$ rman target /
 
全库备份
 
RMAN> backup incremental level 0 database format='/home/oracle/db_bak/%u';
##增量备份第一备份要为全库备份
 
SQL> create table c1 as select * from dba_objects;
 
Table created.
 
SQL> select count(*) from c1;
 
  COUNT(*)
----------
     49747
 
差异备份 
RMAN> backup INCREMENTAL LEVEL 1 DATABASE format='/home/oracle/db_bak/%u';
 
SQL> create table c2 (id int);
SQL> insert into c2 values(123);
SQL> commit;
(产生的数据较少)
 
累积增量备份
RMAN> backup INCREMENTAL LEVEL 1 CUMULATIVE DATABASE format='/home/oracle/db_bak/%u';