基于时间的备份保留策略的rman研究(四)
w.2cto.com
那么当出现report obsolete时,会立即报告report need backup
[sql]
[root@think ~]# export LANG=en_US
[root@think ~]# date
Wed Oct 10 10:19:16 CST 2012
[root@think ~]# date -s "Tue Oct 10 10:17:00 CST 2012"
Wed Oct 10 10:17:00 CST 2012
[root@think ~]# date
Wed Oct 10 10:17:03 CST 2012
[root@think ~]# su - oracle
[oracle@think ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Oct 10 10:17:14 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1312966189)
RMAN> report obsolete
2> ;
www.2cto.com
using target database control file instead of recovery catalog
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 1 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 3 2012-10-09:10:14:46
Backup Piece 3 2012-10-09:10:14:46 /u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_10_09/o1_mf_nnndf_TAG20121009T101445_87724os6_.bkp
RMAN> report need backup;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 1 days
Report of files that must be backed up to satisfy 1 days recovery window
File Days Name
---- ----- -----------------------------------------------------
1 2659 /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_7wvsw7b2_.dbf
3 2659 /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_7wvsw7bd_.dbf
5 127 /u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_7wvsxyqt_.dbf
6 123 /u01/app/oracle/oradata/ORCL/datafile/o1_mf_ts_1_7x5v2q05_.dbf
www.2cto.com
4 对optimization的影响
备份优化与速度无关,而是针对是否对只读表空间进行备份
[sql]
SQL> alter tablespace users read only;
Tablespace altered.
RMAN> CONFIGURE BACKUP OPTIMIZATION on;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored
RMAN> backup database; //虽然users下线,而且备份优化也开了,但是第一次rman仍然会把users拿去备份
www.2cto.com
Starting backup at 2012-10-09:12:16:15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=139 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_7wvsw7b2_.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_7wvsw7bd_.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_7wvsw7hg_.dbf
input datafile fno=00005 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_7wvsxyqt_.dbf
input datafile fno=00006 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_ts_1_7x5v2q05_.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_7wvsw7gf_.dbf
channel ORA_DISK_1: starting piece 1 at 2012-10-09:12:16:16
channe