Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

0

好友

2

主题
1#
发表于 2013-1-3 17:40:29 | 查看: 5162| 回复: 5
看到11.1官方文档中有如下一段话,红色的字没有看懂,求解答,谢谢。
For the purposes of a backup retention policy based on redundancy, a backup set is counted as one instance of a backup. This statement is true even if there are multiple copies of the backup pieces that make up backup set, such as when a backup set has been backed up from disk to tape.
For the purposes of a recovery window retention policy, either all of the copies of a backup set are obsolete, or none of them are.

This point is easiest to grasp when viewing the output of the LIST and REPORT commands.
To view the effect of a backup retention policy on backups of backups:

Back up a datafile.
The following example backs up datafile 5:
BACKUP AS BACKUPSET DATAFILE 5;
Run the LIST command for the datafile backup in the preceding step.
For example, run the following command (sample output included).
LIST BACKUP OF DATAFILE 5 SUMMARY;

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
18      B  F  A DISK        04-AUG-07       1       1       NO         TAG20070804T160 134
Use the backup set key from the previous step to back up the backup set.
For example, enter the following command:
BACKUP BACKUPSET 18;
Run the same LIST command that you ran in step 2.
For example, run the following command (sample output included).
LIST BACKUP OF DATAFILE 5 SUMMARY;

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
18      B  F  A DISK        04-AUG-07       1       2       NO         TAG20070804T160 134
Only one backup set is shown in this output, but there are now two copies of it.
Generate a report to see the effect of these copies under a redundancy-based backup retention policy.
For example, issue the following command:
REPORT OBSOLETE REDUNDANCY 1;

None of the copies is reported as obsolete because both copies of the backup set have the same values for set_stamp and set_count.
Generate a report to see the effect of these copies under a recovery window-based backup retention policy.
For example, issue the following command:
REPORT OBSOLETE RECOVERY WINDOW 1 DAY;

None of the copies of the backup set is reported as obsolete or based on the CHECKPOINT_CHANGE# of this backup set, with respect to the current time and the availability of other backups.


2#
发表于 2013-1-4 15:28:00
这里 文档时想解释 backup policy中: redundancy和 recovery windows的区别

A retention Policy must be defined -redundancy or recovery Window


保留策略描述哪些备份将被保留以及保留时间。
• 有以下两种类型的保留策略:
– 恢复窗口:建立一个时间段,在该时段内必须可以进行
时间点恢复
– 冗余:建立必须保留的固定数量的备份
• 这些策略互相排斥,并且都可以使用CONFIGURE
命令进行设置


recovery Window 是一种保留策略

保留策略
保留策略描述哪些备份将被保留以及保留时间。可通过CONFIGURE 命令设置保留策略的
值。最佳方案是确定一个时段,在此期间内可以发现逻辑错误,然后通过执行时间点恢复
正好恢复到错误前的那一点来修复受影响的对象。这段时间期称为恢复窗口。此策略用天
数指定。对于每个数据文件,都必须始终存在一个满足以下条件的备份:
SYSDATE - checkpoint_time <= recovery_window
例如,如果策略设置如下:
RMAN> CONFIGURE RETENTION POLICY
2 TO RECOVERY WINDOW OF 7 DAYS;
那么,每个文件必须有一个满足以下条件的备份:
SYSDATE - (SELECT checkpoint_time
FROM V$DATAFILE WHERE file#= …) >= 7

应保持恢复窗口时间期小于或等于控制文件参数CONTROL_FILE_RECORD_KEEP_TIME
的值,以防止控制文件中较早备份的记录被覆盖。


如果需要保留一定数量的备份,可以通过冗余选项设置保留策略。此选项要求在任何备份
被标识为过时之前将指定数量的备份列入目录。默认保留策略的冗余度为1,这表示在任
意指定时间一个文件只存在一个备份。如果已经备份了相同文件的较新版本,那么该文件
原来的备份将视为作废。




回复 只看该作者 道具 举报

3#
发表于 2013-1-4 21:46:48
谢谢Maclean Liu的解答。
redundancy和 recovery windows的区别我知道,我帖子上说的应该是备份集的备份(backup backupset),不是普通的备份在redundancy和 recovery windows rentention policy的不同,但是我没有看懂,还请你再为我解答一下:
For the purposes of a backup retention policy based on redundancy, a backup set is counted as one instance of a backup. This statement is true even if there are multiple copies of the backup pieces that make up backup set, such as when a backup set has been backed up from disk to tape.
For the purposes of a recovery window retention policy, either all of the copies of a backup set are obsolete, or none of them are.

None of the copies is reported as obsolete because both copies of the backup set have the same values for set_stamp and set_count.
Generate a report to see the effect of these copies under a recovery window-based backup retention policy.

None of the copies of the backup set is reported as obsolete or based on the CHECKPOINT_CHANGE# of this backup set, with respect to the current time and the availability of other backups.

回复 只看该作者 道具 举报

4#
发表于 2013-1-4 22:29:40
本帖最后由 wind 于 2013-1-4 22:36 编辑

这个帖子不是问redundancy和 recovery windows的区别,是问backup backupset在两个策略里怎么算。

backup backupset例子里,是对备份集的再一次备份,其实例子也说了,其实就是一个备份,两个copy,拷贝了两次。

你的那段红字是说,(backup backupset)两个copy,算作一次备份,针对retundancy policy来说,譬如你的retundancy policy是1,就是说(backup backupset)两个copy当做一次备份,都不会过期。这个例子是我举的,这样你更好理解,鬼佬的思维写的有点繁琐。

(backup backupset)针对时间窗口来说,他们有相同的时间和备份次数,此时例子里也是没有过期的。但是他们两个copy要么都过期,要么都不过期。

不知道我解释清楚了没有。不明白再问。

回复 只看该作者 道具 举报

5#
发表于 2013-1-4 23:08:33
a backup set is counted as one instance of a backup. This statement is true even if there are multiple copies of the backup pieces that make up backup set, such as when a backup set has been backed up from disk to tape.

直译是:

一个备份集被算作一次备份, 这种算法甚至在多个备份片组成一个备份集时成立,  例如当备份集被从磁盘备份到磁带。



For the purposes of a recovery window retention policy, either all of the copies of a backup set are obsolete, or none of them are.


由于recovery window保留策略的缘故, 要么所有备份集合的拷贝都是 obsolete的,要么都不是


以上译文哪一点无法理解? 请 逻辑推理指出!

回复 只看该作者 道具 举报

6#
发表于 2013-1-5 14:57:39
本帖最后由 xiangni330 于 2013-1-6 17:51 编辑

谢谢两位解答!backup backupset的保留策略基本搞懂了。
但是我看到一道题,答案是B,我觉得应该是A(无论是恢复窗口还是冗余,对于备份集的备份,要么都obsolete要么都不obsolete),不知道是不是答案错了。
which statement describes the effect of a backup rentention plicy on the backup of a backup set?
A.Either all the copies of a backup set are obsolete or none of them are as per the rentetion policy.
B.All the copies of the backup set are counted as one instance of a backup and will be deleted if backup set exceeds the reundancy-based backup rentention policy.

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-26 13:53 , Processed in 0.045137 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569