目录
查看RMAN基本配置
- 进入RMAN命令行
rman target / -- “/” 就代表了sysdba权限
- 查看参数命令
show all;
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.2.0/db_1/dbs/snapcf_orcl.f'; # default
修改RMAN配置参数
写几个例子大家就明白了。
- 将备份冗余策略修改为备份文件有7天有效期
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters are successfully stored
- 再把7天有效期的冗余策略修改回默认值
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
new RMAN configuration parameters are successfully stored
基本配置参数说明
那么下面依次对RMAN各个参数进行说明。
1、控制RMAN备份冗余策略
2、是否开启RMAN备份优化器
3、选择RMAN备份的介质类型
4、控制是否自动生成控制文件备份
5、控制RMAN备份的并发数量
6、控制默认的复制份数
7、RMAN产生的备份集最大值
8、RMAN设置备份与恢复时需要输入的密码
9、压缩参数 压缩例子:
10、控制RMAN输出结果保留天数
11、归档自动删除策略
12、控制文件的快照备份
|