1、rman常用配置
配置自动分配通道
configure channel device type disk format '/...../%S'
配置备份的冗余策略
configure retention policy to redundancy 2 保存最近的两次备份信息
configure retention policy to recovery window of 7 days 保留最近7天的备份信息
检查陈旧的备份信息
report obsolete
配置备份集中备份片的副本个数(最多4个)
configure datafile backup copies for device type disk 2
自动检查要备份的文件是否需要备份
configure backup optimization on(设置为on,则表示rman在进行备份时检查要备份的文件是否有相同的文件在备份集中,如果有则不进行备份。 判断标准是两个相同的文件内容完全一致)
恢复到默认的configure信息
configure retention policy clear
查看数据库的物理模式
report schema
查看那些文件需要备份
report need backup
2、catalog数据库的配置
1>在catalog数据库上创建一个表空间供catalog使用
create tablespace rman_ts datafile '/..../..dbf' size 50m extent management local uniform size 126k;
2>在catalog数据库上创建用户并赋予权限
create user rman_user identified by rman_user default tablespace rman_ts quota unlimited on rman_ts;
grand recovery_catalog_owner to rman_user;
grand connect,resource to rman_user;
3>在catalog上配置并启动监听程序,在target数据库上配置本地命名服务。
4>在target数据库的机器上通过本地命名服务连接到catalog数据库
rman target / catalog rman_user/rman_user@rman_tns;
rman>create catalog tablespace rman_ts;
rman>register database; 在catalog数据库上注册target数据库。