<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>天道酬勤 &#187; rman;backup optimization</title>
	<atom:link href="http://www.ochef.net/tag/rmanbackup-optimization/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ochef.net</link>
	<description>Oracle and My Life</description>
	<lastBuildDate>Mon, 09 Jan 2012 05:39:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CONFIGURE BACKUP OPTIMIZATION</title>
		<link>http://www.ochef.net/2009/08/configure-backup-optimization.html</link>
		<comments>http://www.ochef.net/2009/08/configure-backup-optimization.html#comments</comments>
		<pubDate>Sat, 08 Aug 2009 02:17:40 +0000</pubDate>
		<dc:creator>ochef</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[rman;backup optimization]]></category>

		<guid isPermaLink="false">http://www.ochef.net/?p=506</guid>
		<description><![CDATA[上周，为客户编写了一个RMAN备份的脚本，这周一客户来电告之说生产系统每天产生的归档日志有几G，每天要备全库二次（其实我是不建议这样的备份策略的，但客户坚持要这样），由于备份占用的空间太大，想在全备之后删除2天前备份的归档。 #find archpath  -mtime 2 -exec rm -rf {} \; 这条命令是删除二天前系统生产的归档日志，并不是删除备份集中二天前的归档，这样做会与controlfile或者catalog的信息不一致。看下面的这条命令： RMAN&#62; backup archivelog all delete input&#124;all; delete后面只能接input或all参数，无法指定日期，显然也达不到客户要求，再来这条命令： RMAN&#62;backup archivelog until time &#8216;SYSDATE-2&#8242; delete input; 该好像可以做到，但仔细一想，这条命令是备份2天前的归档日志然后将其删除而客户要求的是全备。 最后我们来看看下面的命令是否可以： RMAN&#62;delete noprompt archivelog  until time &#8216;sysdate-2&#8242;; 这条命令是可以的达到客户要求的，注意一点，命令要放在备份语句之后。 如果事情做到这里的话，就不太完美，更重要的是我们是技术服务性的公司，应该站在客户的角度协助客户把系统管理得更好，更稳定。在RMAN备份中，还有一个参数：BACKUP OPTIMIZATION，备份优化。 RMAN中的备份优化是指在备份过程中，如果满足特定条件，RMAN将自动跳过某些文件而不将它们包含在备份集中以节省时间和空间,或者简单点就是能不备的就不备。一般在满足下面的条件下，才能够启用备份优化的功能： 1).BACKUP OPTIMIZATION参数置为OFF，使用下面的命令打开： RMAN&#62; CONFIGURE BACKUP OPTIMIZATION ON; 2).执行的BACKUP DATABASE或BACKUP ARCHIVELOG命令中带有ALL或LIKE参数。 3).分配的通道仅使用了一种设备类型，不能同时有sbt与disk的多个通道出现。 RMAN是如何判断要备份的文件是否需要被优化呢？算法就不追究了，影响优化算法的因素也是非常多的。 譬如客户的情况：在下午13：00执行一次全备，在凌晨1：00又执行一次全备，此时，备份的文件中没有变动而且又被备份过时，才会跳过这部分文件。理论上备份优化仅对于只读表空间或offline表空间起作用，但同时对于已经备份过的archivelog文件也会跳过不再备份。像客户的这种情况，如果没有设置backup optimization on, 有可能会重复备份归档日志。 有关更多的备份优化信息，猛击这里。 -The [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Frman-ora-1950427038.html&from=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Fconfigure-backup-optimization.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">RMAN ORA-19504、ORA-27038错误解决方法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F11%2Frecover-db-without-backup.html&from=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Fconfigure-backup-optimization.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">无有效备份下恢复数据库一例</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F11%2Flearning-nfs-network-file-system-optimization-b.html&from=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Fconfigure-backup-optimization.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">学习：NFS网络文件系统优化(二)</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2009%2F12%2Foracle-sql-developer-2-1-released.html&from=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Fconfigure-backup-optimization.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Oracle SQL Developer 2.1 Released</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>上周，为客户编写了一个RMAN备份的脚本，这周一客户来电告之说生产系统每天产生的归档日志有几G，每天要备全库二次（其实我是不建议这样的备份策略的，但客户坚持要这样），由于备份占用的空间太大，想在全备之后删除2天前备份的归档。</p>
<p>#find archpath  -mtime 2 -exec rm -rf {} \;</p>
<p>这条命令是删除二天前系统生产的归档日志，并不是删除备份集中二天前的归档，这样做会与controlfile或者catalog的信息不一致。看下面的这条命令：</p>
<p>RMAN&gt; backup archivelog all delete input|all;</p>
<p>delete后面只能接input或all参数，无法指定日期，显然也达不到客户要求，再来这条命令：</p>
<p>RMAN&gt;backup archivelog until time &#8216;SYSDATE-2&#8242; delete input;</p>
<p>该好像可以做到，但仔细一想，这条命令是备份2天前的归档日志然后将其删除而客户要求的是全备。</p>
<p>最后我们来看看下面的命令是否可以：</p>
<p>RMAN&gt;delete noprompt archivelog  until time &#8216;sysdate-2&#8242;;</p>
<p>这条命令是可以的达到客户要求的，注意一点，命令要放在备份语句之后。</p>
<p>如果事情做到这里的话，就不太完美，更重要的是我们是技术服务性的公司，应该站在客户的角度协助客户把系统管理得更好，更稳定。在RMAN备份中，还有一个参数：BACKUP OPTIMIZATION，备份优化。</p>
<p>RMAN中的备份优化是指在备份过程中，如果满足特定条件，RMAN将自动跳过某些文件而不将它们包含在备份集中以节省时间和空间,或者简单点就是能不备的就不备。一般在满足下面的条件下，才能够启用备份优化的功能：</p>
<p>1).BACKUP OPTIMIZATION参数置为OFF，使用下面的命令打开：</p>
<p>RMAN&gt; CONFIGURE BACKUP OPTIMIZATION ON;</p>
<p>2).执行的BACKUP DATABASE或BACKUP ARCHIVELOG命令中带有ALL或LIKE参数。</p>
<p>3).分配的通道仅使用了一种设备类型，不能同时有sbt与disk的多个通道出现。</p>
<p>RMAN是如何判断要备份的文件是否需要被优化呢？算法就不追究了，影响优化算法的因素也是非常多的。</p>
<p>譬如客户的情况：在下午13：00执行一次全备，在凌晨1：00又执行一次全备，此时，备份的文件中没有变动而且又被备份过时，才会跳过这部分文件。理论上备份优化仅对于只读表空间或offline表空间起作用，但同时对于已经备份过的archivelog文件也会跳过不再备份。像客户的这种情况，如果没有设置backup optimization on, 有可能会重复备份归档日志。</p>
<p>有关更多的备份优化信息，<a title="backup optimization" href="http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmconc1.htm#468047" target="_blank">猛击这里</a>。</p>
<p>-The End-</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Frman-ora-1950427038.html&from=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Fconfigure-backup-optimization.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">RMAN ORA-19504、ORA-27038错误解决方法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F11%2Frecover-db-without-backup.html&from=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Fconfigure-backup-optimization.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">无有效备份下恢复数据库一例</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2010%2F11%2Flearning-nfs-network-file-system-optimization-b.html&from=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Fconfigure-backup-optimization.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">学习：NFS网络文件系统优化(二)</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ochef.net%2F2009%2F07%2Fibm-ds4300-firmware-upgrade.html&from=http%3A%2F%2Fwww.ochef.net%2F2009%2F08%2Fconfigure-backup-optimization.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">IBM DS4300微码升级失败解决办法</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.ochef.net/2009/08/configure-backup-optimization.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

