Oracle如何对失败的RMAN备份进行续备

有时由于目标备份的空间限制或数据库大小限制,就需要一个选项来恢复备份失败的 RMAN 备份。
新的备份应该跳过先前已经备份的文件,并备份其余未备份的文件。
命令示例:

backup as compressed backupset database not backed up since time 'sysdate - ';

测试如下:
(1)备份一部分数据文件

RMAN> backup as compressed backupset datafile 1,4,5,6,7,8,9,10,11,12,13,14;
Starting backup at 21-JUN-23
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=28 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oradata/orcl/system01.dbf
input datafile file number=00004 name=/oradata/orcl/users01.dbf
input datafile file number=00010 name=/oradata/orcl/big1.dbf
input datafile file number=00011 name=/oradata/orcl/big2.dbf
input datafile file number=00012 name=/oradata/orcl/h01.dbf
input datafile file number=00013 name=/oradata/orcl/fqcs1.dbf
input datafile file number=00014 name=/oradata/orcl/fqcs2.dbf
input datafile file number=00009 name=/oradata/orcl/p2.dbf
input datafile file number=00006 name=/oradata/orcl/test_b.dbf
input datafile file number=00007 name=/oradata/orcl/test_c.dbf
input datafile file number=00005 name=/oradata/orcl/p1.dbf
input datafile file number=00008 name=/oradata/orcl/audit_tbs1.dbf
channel ORA_DISK_1: starting piece 1 at 21-JUN-23
channel ORA_DISK_1: finished piece 1 at 21-JUN-23
piece handle=/u01/flashback/ORCL/backupset/2023_06_21/o1_mf_nnndf_TAG20230621T151916_l9593o4o_.bkp tag=TAG20230621T151916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 21-JUN-23
channel ORA_DISK_1: finished piece 1 at 21-JUN-23
piece handle=/u01/flashback/ORCL/backupset/2023_06_21/o1_mf_ncsnf_TAG20230621T151916_l9595ftq_.bkp tag=TAG20230621T151916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 21-JUN-23

(2)备份剩余的数据文件

RMAN> backup as compressed backupset database not backed up since time 'sysdate -1';
Starting backup at 21-JUN-23
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
skipping datafile 1; already backed up on 21-JUN-23  ---会跳过已经备份的数据文件
skipping datafile 4; already backed up on 21-JUN-23
skipping datafile 5; already backed up on 21-JUN-23
skipping datafile 6; already backed up on 21-JUN-23
skipping datafile 7; already backed up on 21-JUN-23
skipping datafile 8; already backed up on 21-JUN-23
skipping datafile 9; already backed up on 21-JUN-23
skipping datafile 10; already backed up on 21-JUN-23
skipping datafile 11; already backed up on 21-JUN-23
skipping datafile 12; already backed up on 21-JUN-23
skipping datafile 13; already backed up on 21-JUN-23
skipping datafile 14; already backed up on 21-JUN-23
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/oradata/orcl/undotbs01.dbf  ---对剩余数据文件进行备份
input datafile file number=00002 name=/oradata/orcl/sysaux01.dbf
channel ORA_DISK_1: starting piece 1 at 21-JUN-23
channel ORA_DISK_1: finished piece 1 at 21-JUN-23
piece handle=/u01/flashback/ORCL/backupset/2023_06_21/o1_mf_nnndf_TAG20230621T152215_l95997tf_.bkp tag=TAG20230621T152215 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 21-JUN-23

你可能感兴趣的:(oracle,数据库,RMAN)