应客户需求,对数据库进行备份,数据库每天备份,备份到两个路径下,之前试过备份一次,出现一定的报错
以下为数据库的日常备份脚本
run
{
Allocate channel c1 type disk;
Allocate channel c2 type disk;
crosscheck archivelog all;
delete noprompt archivelog until time 'sysdate-3';
delete noprompt expired archivelog all;
report obsolete;
delete noprompt obsolete;
backup filesperset=3 format='D:\rman\%T_%d_%s_%p.bus','D:\7dayrman\%T_%d_%s_%p.bus' as compressed backupset database;
backup filesperset=10 format='D:\rman\%T_%d_%s_%p.arc','D:\7dayrman\%T_%d_%s_%p.bus' as compressed backupset archivelog all;
backup format='D:\rman\%T_%d_%s_%p.ctl','D:\7dayrman\%T_%d_%s_%p.bus' current controlfile;
Release channel c1;
Release channel c2;
}
#查看rman配置
show all;
CONFIGURE CH