oracle怎么增量备份,Oracle 增量备份

本文介绍Oracle数据库使用RMAN进行1级和0级增量备份的批处理脚本实现方法,包括配置保留策略、自动备份控制文件、分配通道及备份策略等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

常用脚本: -----1. 0级备份 批处理文件: set Oracle_SID=orcl rman target sys/test@orcl cmdfile=

常用脚本:

-----1. 0级备份

批处理文件:

set Oracle_SID=orcl

rman target sys/test@orcl cmdfile= 'S:/backup/scripts/0/db_fullbakup_orcl.rman' LOG='S:/backup/log/rman_backup_%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%.log'

rman脚本:

run {

configure retention policy to recovery window of 14 days;

configure controlfile autobackup on;

configure controlfile autobackup format for device type disk to 'S:\backup\controlfile\bak_%F';

allocate channel c1 device type disk format 'S:\backup\data\bak_%u';

allocate channel c2 device type disk format 'S:\backup\data\bak_%u';

backup incremental level=0 database skip inaccessible

plus archivelog filesperset 20

delete all input;

release channel c1;

release channel c2;

}

allocate channel for maintenance device type disk;

crosscheck backupset;

delete noprompt obsolete;

-----2. 1级备份

批处理文件:

set ORACLE_SID=orcl

rman target sys/test@orcl cmdfile='S:/backup/scripts/1/db_fullbakup_orcl.rman' LOG='S:/backup/log/rman_backup_%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%.log'

rman脚本:

run {

configure retention policy to recovery window of 14 days;

configure controlfile autobackup on;

configure controlfile autobackup format for device type disk to 'S:\backup\controlfile\bak_%F';

allocate channel c1 device type disk format 'S:\backup\data\bak_%u';

allocate channel c2 device type disk format 'S:\backup\data\bak_%u';

backup incremental level=1 cumulative database skip inaccessible

plus archivelog filesperset 20

delete all input;

release channel c1;

release channel c2;

}

allocate channel for maintenance device type disk;

crosscheck backupset;

delete noprompt obsolete;

logo.gif

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值