开始新对话

此帖子已超过 5 年

Solved!

Go to Solution

3197

2013年6月17日 00:00

请教关于保留策略的问题

请教大家。我有一个oracle的服务器,配置好了Networker的备份,能够正常的schedule全备份等。也可以自己手工执行命令备份。问题在于,当我明确定义一个client资源的时候,可以选择保留策略。可是我随便的在RMAN CLI里面打命令做备份的时候,这个保留策略如何设置呢?

36 消息

2013年6月17日 00:00

我自己找到了。

手工备份时,会继承这个client其他资源中,保留期限最长的一个。

36 消息

2013年6月17日 00:00

不是的,我问的不是这一块。例如:configure retention policy to none; 我用这个把rman的保留策略关掉,然后再手工备份,这时候,是Networker负责浏览及保留策略。这个策略如何设置呢?我的测试结果是,手工备份时,会继承这个client其他资源中,保留期限最长的一个。

1.1K 消息

2013年6月17日 00:00

把rman的保留策略关掉,默认就用客户机属性里面定义的browse policy 和retention policy,除非在单次备份中使用了NSR_SAVESET_BROWSE 和 NSR_SAVESET_RETENTION参数。

1.1K 消息

2013年6月17日 00:00

这是个纯ORACLE问题了。RMAN环境本身就是可以设置保留策略的。这个策略记录在catalog database或者control file内。

RMAN> SHOW ALL;

RMAN configuration parameters are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # 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 SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/9.2.0/dbs/snapcf_TARGDB.f'; # default

默认的保留策略是每个备份保留一个副本。一般你可以改成这样:

CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;

每个备份保留两个副本,或者每个备份保留3天。

以上对所有备份起效。

如果只想针对个别备份,命令如下:

backup database keep forever;                

backup database keep until time='sysdate+30';

永久保留或者保留30天。

你可以看看ORACLE管理员手册。

1.1K 消息

2013年6月17日 01:00

注意粗体部分

If a browse or retention policy is not specified for a manual backup, the policies are determined as follows:

◆ Browse policy

The save sets included in a manual backup adopt the browse policy of the Client resource. If there are multiple Client resources for the NetWorker host, the Client resource with the longest browse time is adopted. For example, if there are three Client resources for the NetWorker client mars, each with one of these browse periods:

• One week

• One month

• One year

A manual backup of mars adopts a browse policy of one year.

◆ Retention Policy

The save sets included in a manual backup adopt the retention policy of the Client resource according to the same rules that were described previously for browse policies. However, if a retention policy is set up for the media pool to which the

backup is directed, the retention policy will be the longer of either:

• The Client resource retention policy

• The media pool retention policy

36 消息

2013年6月17日 01:00

我的意思是,我根本没有定义对应的client。手工发起了一个没有定义的备份,这时候保留策略如何设置呢?

36 消息

2013年6月17日 01:00

是的,我就是说这个意思。

谢谢你的帮助,我忘记在官方指南找这个了。

找不到事件!

Top