<?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>雨无形的BLOG &#187; discuz</title>
	<atom:link href="http://www.yuwuxing.com/tag/discuz/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuwuxing.com</link>
	<description>关注互联网发展</description>
	<lastBuildDate>Fri, 23 Dec 2011 04:00:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>discuz论坛误删全部帖子的恢复</title>
		<link>http://www.yuwuxing.com/discuz-recovery/</link>
		<comments>http://www.yuwuxing.com/discuz-recovery/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 12:19:53 +0000</pubDate>
		<dc:creator>雨无形</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[discuz]]></category>
		<category><![CDATA[mysqlbinlog]]></category>
		<category><![CDATA[数据恢复]]></category>

		<guid isPermaLink="false">http://www.yuwuxing.com/?p=175</guid>
		<description><![CDATA[今天有人向我求助，他在用dz批量删除帖子的时候因为误操作把帖子都删光了，问我能不能恢复，因为论坛上次备份还是12月7号，所以通过备份还原已经是不可能了，只能恢复到12月7号的时候。我查了一下，还好mysql的binlog开启了，这样就还有恢复的希望。 先找到mysql的日志文件，这个服务器上在/mysql/data/下，命名是mysql-bin.******,查了一下，12月7号之后备份的序号为/data/mysql-bin.000027开始，今天的序号为/data/mysql-bin.000029。然后就用mysqlbinlog工具来恢复数据吧。 首先把论坛的库里面的数据都删掉，然后恢复到12月7号，然后查看备份文件的备份时间为12月7日22:13:32，记下这个时间，然后执行以下命令 mysqlbinlog ../data/mysql-bin.000027 &#8211;start-date=”2009-12-07 22:13:32&#8243; -d dbname &#124; mysql -u root -pyourpassword 如果报错可以把时间往后调一两秒试下 然后恢复/data/mysql-bin.000028 如下 mysqlbinlog ../data/mysql-bin.000028 -d dbname &#124; mysql -u root -pyourpassword 最后恢复/data/mysql-bin.000029，这个要注意截止时间。如果记得误操作的时间最好，如果不记得误操作的时间可以用 mysqlbinlog ../data/mysql-bin.000029 -d dbname &#62; d:\000029.sql 将日志导出成sql文件，然后在里面查找删除帖子的命令，然后查看时间。比如为2010-01-20 09:53:45。（ps：导出的文件通常会比较大，强烈建议用emeditor编辑） 确定时间以后执行 mysqlbinlog ../data/mysql-bin.000028 &#8211;stop-date=”2010-01-20 9:53:00&#8243; -d dbname &#124; mysql -u root -pyourpassword 执行完了以后基本数据就恢复了。 此后还有一个步骤要做就是恢复附件，帖子删除以后福建也会随之删除，这个时候就需要恢复附件文件了，这里推荐使用easyrecovery，非常简单易用，恢复后复制到相关目录即可。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="新入手个黑莓" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmy-new-blackberry%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2187283.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">新入手个黑莓</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="关于表格的学习笔记" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Ftable-study-note%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2187238.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">关于表格的学习笔记</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="flash中用attachMovie复制元件置于舞台的方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fuse-attachmovie-copy-element-in-stage%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2187486.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">flash中用attachMovie复制元件置于舞台的方法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="先记下一些刚学会的黑莓技巧吧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fsome-blackberry-skill%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2187279.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">先记下一些刚学会的黑莓技巧吧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="51凤凰游记" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fphoenix-travel-notes%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2187450.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">51凤凰游记</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" 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>今天有人向我求助，他在用dz批量删除帖子的时候因为误操作把帖子都删光了，问我能不能恢复，因为论坛上次备份还是12月7号，所以通过备份还原已经是不可能了，只能恢复到12月7号的时候。我查了一下，还好mysql的binlog开启了，这样就还有恢复的希望。</p>
<p>先找到mysql的日志文件，这个服务器上在/mysql/data/下，命名是mysql-bin.******,查了一下，12月7号之后备份的序号为/data/mysql-bin.000027开始，今天的序号为/data/mysql-bin.000029。然后就用mysqlbinlog工具来恢复数据吧。</p>
<p>首先把论坛的库里面的数据都删掉，然后恢复到12月7号，然后查看备份文件的备份时间为12月7日22:13:32，记下这个时间，然后执行以下命令</p>
<blockquote><p>mysqlbinlog ../data/mysql-bin.000027 &#8211;start-date=”2009-12-07 22:13:32&#8243; -d <strong><span style="color: #339966;">dbname</span></strong> | mysql -u root -p<strong><span style="color: #339966;">yourpassword</span></strong></p></blockquote>
<p>如果报错可以把时间往后调一两秒试下</p>
<p>然后恢复/data/mysql-bin.000028 如下</p>
<blockquote><p>mysqlbinlog ../data/mysql-bin.000028 -d <strong><span style="color: #339966;">dbname</span></strong> | mysql -u root -p<strong><span style="color: #339966;">yourpassword</span></strong></p></blockquote>
<p>最后恢复/data/mysql-bin.000029，这个要注意截止时间。如果记得误操作的时间最好，如果不记得误操作的时间可以用</p>
<blockquote><p>mysqlbinlog ../data/mysql-bin.000029 -d <strong><span style="color: #339966;">dbname</span></strong> &gt; d:\000029.sql</p></blockquote>
<p>将日志导出成sql文件，然后在里面查找删除帖子的命令，然后查看时间。比如为2010-01-20 09:53:45。（<span style="color: #ff0000;">ps：导出的文件通常会比较大，强烈建议用</span><strong><span style="color: #ff0000;">emeditor</span></strong><span style="color: #ff0000;">编辑</span>）</p>
<p>确定时间以后执行</p>
<blockquote><p>mysqlbinlog ../data/mysql-bin.000028 &#8211;stop-date=”2010-01-20 9:53:00&#8243; -d <strong><span style="color: #339966;">dbname</span></strong> | mysql -u root -p<strong><span style="color: #339966;">yourpassword</span></strong></p></blockquote>
<p>执行完了以后基本数据就恢复了。</p>
<p>此后还有一个步骤要做就是恢复附件，帖子删除以后福建也会随之删除，这个时候就需要恢复附件文件了，这里推荐使用<strong><span style="color: #ff0000;">easyrecovery</span></strong>，非常简单易用，恢复后复制到相关目录即可。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="网站字体选择研究" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fhow-to-set-fontfamily%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2187454.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">网站字体选择研究</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="51凤凰游记" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fphoenix-travel-notes%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2187450.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">51凤凰游记</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="《网页设计技巧》系列之一 浅谈文本排版" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Ftext-typeset-of-web-design%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2187512.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">《网页设计技巧》系列之一 浅谈文本排版</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="IETester多IE版本共存的解决方案" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fietester%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2186929.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">IETester多IE版本共存的解决方案</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="帮太和服饰做的网站售前页面" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fweb-design-for-tahan%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdiscuz-recovery%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/01/19/2187457.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">帮太和服饰做的网站售前页面</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" 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.yuwuxing.com/discuz-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

