<?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>Mr. 21</title>
	<atom:link href="http://mr21.in/feed" rel="self" type="application/rss+xml" />
	<link>http://mr21.in</link>
	<description>KunMing &#124; System Administrator &#124; Webmaster &#124; G Fans &#124; Blogger</description>
	<lastBuildDate>Mon, 08 Mar 2010 06:27:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>苹果本子序列号解读</title>
		<link>http://mr21.in/2010-03/%e8%8b%b9%e6%9e%9c%e6%9c%ac%e5%ad%90%e5%ba%8f%e5%88%97%e5%8f%b7%e8%a7%a3%e8%af%bb.html</link>
		<comments>http://mr21.in/2010-03/%e8%8b%b9%e6%9e%9c%e6%9c%ac%e5%ad%90%e5%ba%8f%e5%88%97%e5%8f%b7%e8%a7%a3%e8%af%bb.html#comments</comments>
		<pubDate>Mon, 08 Mar 2010 06:22:06 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[MacBook]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=337</guid>
		<description><![CDATA[自己记录一下。
解读网址： http://www.chipmunk.nl/klantenservice/applemodel.html
这个地址会根据你的序列号分析你的产品信息。
大概的序列号规则是（引用自：Macfans）：
    苹果机器序列号共11位， 如 U... ]]></description>
			<content:encoded><![CDATA[<p>自己记录一下。</p>
<p>解读网址： http://www.chipmunk.nl/klantenservice/applemodel.html<br />
这个地址会根据你的序列号分析你的产品信息。</p>
<p>大概的序列号规则是（引用自：<a href="http://www.macfans.com.cn/viewthread.php?tid=81338">Macfans</a>）：</p>
<blockquote><p>    苹果机器序列号共11位， 如 UV4290FMR73<br />
    1－2 ：产地<br />
    3 ：年<br />
    4－5 ：星期<br />
    6－8 ：产品号（34进制数）<br />
    9－11 ：型号编号</p>
<p>    产地：<br />
    F: Fremont, California, USA<br />
    CK: Cork, Ireland<br />
    SG or E: Singapore<br />
    QF: ElkGrove/Sacramento, California<br />
    UV: Taiwan<br />
    QT: Taiwan (Quanta Factory)<br />
    PT: Korea<br />
    4U: China<br />
    –以上的很老了–<br />
    W8: Shanghai China<br />
    G8: USA<br />
    7J: China (Hon Hai = Foxconn)<br />
    YM: China (Hon Hai = Foxconn) Configured in Czech Republic?</p>
<p>    产品号：<br />
    34进制：0－9，A-Z 但不包含 I 和 O (以免混淆1和0），共34个数字。</p>
<p>    每周产品从0开始计数。<br />
    比如0FM, 就是0(0)*34^2+F( 15 )*34+M( 21 ) = 531</p>
<p>    UV4290FMR73的含义就是<br />
    台湾产， 04年， 第29星期， 第531台（第29周的）， R73（ibook）。<br />
    SG0331FSK59<br />
    新加坡， 00年， 第33星期， 第1692台， K59（cube）。
</p></blockquote>
<blockquote><p>
    我的情况：<br />
    Serial number: W8003***66D<br />
    Group1: MacBook<br />
    Group2: Pro<br />
    Generation:<br />
    ModelCode:<br />
    CPU speed: 2.26GHz<br />
    Screen size: 13 inch<br />
    Colour: Aluminium<br />
    Memory – number of slots: 2<br />
    Factory: W8 (Shanghai China)<br />
    Production year: 2000 （此处应该是2010年）<br />
    Production week: 03 (January)<br />
    Production number: 16xxx (within this week) </p></blockquote>
<p>可见苹果的产能还是不错的，2010.01.30到手的机器，实际上生产时间只是1周，很新鲜～</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-03/%e8%8b%b9%e6%9e%9c%e6%9c%ac%e5%ad%90%e5%ba%8f%e5%88%97%e5%8f%b7%e8%a7%a3%e8%af%bb.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dreamhost到Hawkhost搬家手记</title>
		<link>http://mr21.in/2010-03/dreamhost-to-hawkhost-hosting-move-note.html</link>
		<comments>http://mr21.in/2010-03/dreamhost-to-hawkhost-hosting-move-note.html#comments</comments>
		<pubDate>Mon, 08 Mar 2010 06:17:22 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[網際網路]]></category>
		<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[Hawkhost]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=333</guid>
		<description><![CDATA[前言

2009年4月，因为朋友GordianZ帮助的关系，购入一个777优惠码的Dreamhost（简称DH）主机，之后的几个博客便都搭建在上面，总的来说，还是稳定可靠的，不过，今年4月到期的续费价格高达$119.... ]]></description>
			<content:encoded><![CDATA[<h4>前言<a name="#00"></a></h4>
<div class="imgdivimg2"><img src="http://images.dreamhost.com/logo.png" /></div>
<p>2009年4月，因为朋友<a href="http://GordianZ.com">GordianZ</a>帮助的关系，购入一个777优惠码的Dreamhost（简称DH）主机，之后的几个博客便都搭建在上面，总的来说，还是稳定可靠的，不过，今年4月到期的续费价格高达$119.40，这对不从博客上获得收入的21来说还是一笔很大的开支，于是我便策划着搬家。</p>
<div class="imgdivimg2"><img src="http://www.hawkhost.com/images/logo.gif" width="156px" /></div>
<p>2009年12月，因为朋友<a href="http://www.beishan.info">老卫</a>的非盈利性主机评论博客提到一家主机商叫Hawkhost（简称HH），俗称老鹰主机，在12月份推出了一个高达50%的优惠码，<a href="http://www.hawkhost.com/Shared/compare">基础方案$3.29/mo</a>的费用打折后堪称亲民，于是毫不犹豫就购入一个帐户（老卫把这种行为叫“不理智消费”），但是为什么没有一购入就搬家呢？</p>
<p>搬家前其实是基于两点考量：</p>
<ol>
<li>稳定性未知。虽然官方声称能达到99.9% Uptime，但是我们都知道这个99.9%可以有很多种算法。</li>
<li>可靠性未知。我们知道有些小主机商实际上是骗人的，一两个月后就消失，需要观察。</li>
</ol>
<p>所以，在设置了一个Uptime以后，就暂时闲置了，直到一月初在我的建议之下朋友Tomato也成为WP党的一员，于是应用方面的监测也开始了。就到目前为止的情况来看，长达两个月时间的监测，Uptime非常不错，值得信赖 ── 除了前两个月电信的线路抽风外，所以我决定将DH上的几个博客都迁移过来。</p>
<p>首先说明，因为这是DH到HH的手记，具备一些部分主机可能不具备的特性，所以请酌情参考，有疑问请留言。<br />
Dreamhost和Hawkhost同时具备一个条件：SSH，也就说，很多复杂或者麻烦的操作，我可以通过SSH直接在主机上操作，避免了FTP上传下载需要花费的额外时间开销。这也是这篇手记与一般教程不同的地方。<br />
<span id="more-333"></span></p>
<h3>Dreamhost 的备份<a name="#01"></a></h3>
<p>在DH上执行备份，有两种办法，我分别写出，因为过程混杂，实际上两种我都用到了。</p>
<ul>
<h4>备份方法 一<a name="#011"></a></h4>
<p>Dreamhost提供了一个备份的服务，在DH面板<sup>[1]</sup>左侧Sidebar的位置，<strong>+DreamHost -> Backup Your Account</strong>，然后点一下唯一的按钮，DH会提交你的备份请求到队列里面 ── 对，是要排队的，如果前面的人不多，应该马上就好，备份完成后你的DH帐户的注册邮箱会收到一封邮件，大概内容如下：</p>
<blockquote><p><strong>[username 3158xxxx] Success! Your account (#526xxx) has been backed up!</strong></p>
<p>Ta da!  Your ENTIRE DreamHost account has been backed up now here:</p>
<p>http://backups.dreamhost.com/2010-01-05-GQ2SRxxxxxxxxx <strong>//备份服务登录的链接。</strong></p>
<p>username: {backup login user}  <strong>//登录的用户名，http验证的。</strong><br />
password: {backup login passwd}  <strong>//登录的密码。</strong></p>
<p>Your backup will only be available at this location for FIVE days.. so<br />
please hurry and download what you need right away!<br />
<strong>//意思是说，备份会保存5天，请尽快处理。</strong></p>
<p>Here are all the users/mailboxes we&#8217;ve backed up (as zipped homedirs):<br />
NOTE: Any users with more than 4GB of data have been skipped!<br />
       <strong>{your dh account list here}<br />
//你的DH主帐户和子帐户都会备份（即使home目录不同），并且在这里列出一个清单。</strong></p>
<p>And here are all your mysql databases we&#8217;ve backed up (as gzipped dumps):<br />
NOTE: Any databases with more than 4GB of data have been skipped!<br />
       <strong>{your dh mysql database list here}<br />
//你名下的所有数据库都会备份，并且在这里列出一个清单。</strong></p>
<p>Enjoy!<br />
The Happy DreamHost Account Backup Robot!</p></blockquote>
<p>这个办法会自动备份你所有的东西，非常方便，但是如果你想要更有挑战性呢？方法二。
</ul>
<ul>
<h4>备份方法 二<a name="#012"></a></h4>
<p>先说明，如果你使用备份方法一没有问题，请直接跳入下一章节。</p>
<p>在这里我们需要登入DH的SSH，使用SSH对自己指定的文件进行打包存放，然后再转移，但是这个办法对独立home目录的子帐户无效。<br />
我个人推荐win用户使用putty客户端（Linux和Mac用户直接打开终端输入<strong>ssh username@host</strong>就行），简单明了，登入以后，先输入pwd确认自己的位置，一般都是在用户自己的目录下的，比如我的用户名是delive，效果如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">pwd</span>
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>delive  <span style="color: #ff0000;">'如果不是 /home?/username 格式的，继续'</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">pwd</span>
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>delive</pre></td></tr></table></div>

<p> OK，确认自己已经在自己帐户的目录下了，然后执行以下命令备份文件（不包括数据库）：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">打包压缩需要备份的目录
格式：<span style="color: #c20cb9; font-weight: bold;">tar</span> zcf 目的文件名.tar.gz 需要打包压缩的目录（用空格隔开，可以多个）
范例：
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ls</span>
目录<span style="color: #000000;">1</span> 目录<span style="color: #000000;">2</span> 目录<span style="color: #000000;">3</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zcf bak.tar.gz ~<span style="color: #000000; font-weight: bold;">/</span>目录<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span> ~<span style="color: #000000; font-weight: bold;">/</span>目录<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span> ~<span style="color: #000000; font-weight: bold;">/</span>目录<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span>: Removing leading <span style="color: #000000; font-weight: bold;">`/`</span> from member names
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ls</span>
bak.tar.gz 目录<span style="color: #000000;">1</span> 目录<span style="color: #000000;">2</span> 目录<span style="color: #000000;">3</span></pre></td></tr></table></div>

<p>到这一步，我们已经把目录1/2/3打包为bak.tar.gz文件了，接下来是数据库</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">备份数据库
格式：mysqldump -h数据库主机 -u数据库用户名 <span style="color: #660033;">-p</span> 数据库名 <span style="color: #000000; font-weight: bold;">&gt;</span> 1.sql
范例：
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ mysqldump -hmysql.21.com <span style="color: #660033;">-ublog21</span> <span style="color: #660033;">-p</span> 21db <span style="color: #000000; font-weight: bold;">&gt;</span> 21.sql
Enter password: <span style="color: #ff0000;">'提示这个的时候请输入数据库访问密码，没有回显的，输完回车就行'</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ mysqldump -hmysql.21.com <span style="color: #660033;">-ublog21</span> <span style="color: #660033;">-p</span> 22db <span style="color: #000000; font-weight: bold;">&gt;</span> 22.sql
Enter password:
依此类推</pre></td></tr></table></div>

<p>然后是打包数据库</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zcf mysql.tar.gz 21.sql 22.sql
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ls</span>
.<span style="color: #000000; font-weight: bold;">/</span> ..<span style="color: #000000; font-weight: bold;">/</span> 21.sql 22.sql bak.tar.gz mysql.tar.gz 目录<span style="color: #000000;">1</span> 目录<span style="color: #000000;">2</span> 目录<span style="color: #000000;">3</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zcf dh.tar.gz bak.tar.gz mysql.tar.gz
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ls</span>
.<span style="color: #000000; font-weight: bold;">/</span> ..<span style="color: #000000; font-weight: bold;">/</span> 21.sql 22.sql bak.tar.gz dh.tar.gz mysql.tar.gz 目录<span style="color: #000000;">1</span> 目录<span style="color: #000000;">2</span> 目录<span style="color: #000000;">3</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>avalanche<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">pwd</span>
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>delive</pre></td></tr></table></div>

<p>至此，这个繁琐又复杂的SSH备份总算搞定了。
</ul>
<p>实际上，方法二算是比较啰唆复杂的，并且在一些特殊情况下备份不完整（如果是一个人使用的DH倒是不存在这样的问题），但是为了学习嘛，不过大多数情况下用方法一就行。<br />
下一步就是把备份出来的数据弄到新主机上，这次就需要SSH了，虽然通过一些PHP脚本能搞定，但是我建议有SSH干嘛不用呢？本机也可以想办法下载一份留存，这个留到最后的章节讲解。</p>
<h3>数据的迁移<a name="#02"></a></h3>
<p>因为前一节提到了两种备份办法，所以这一节会对应之前两种方法的迁移方法，基本上来说，不算复杂，但是问题是，备份一的迁移方法要比备份二的迁移方法麻烦一些，为什么呢？请看。</p>
<ul>
<h4>迁移方法 一（对应备份一）<a name="#021"></a></h4>
<p>先简述，因为之前备份一实际上备份文件是存放在DH的备份服务器上的，并且以网页的形式体现的，而除了http下载之外，我们似乎也没有其它办法获取那些备份文件，如果子帐户多一点或者数据库多一点，那会变得比较麻烦。<br />
正常情况下，我们可以在网页右键选择“使用迅雷下载全部链接”来搞定这个问题，但是，本手记的目的是不通过本机的迁移，所以，我们将用SSH解决。</p>
<p>登录HH的SSH，然后我们准备好之前DH备份完成的邮件，开始：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">21MBP:~ 21$ ssh user@example.com
The authenticity of host 'example.com (174.37.xxx.xx)' can't be established.
RSA key fingerprint is cc:bd:03:fc:f7:59:fe:96:90:82:44:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'example.com,174.37.xxx.xx' (RSA) to the list of known hosts.
example@example.com's password: 
example@example.com [~]#</pre></td></tr></table></div>

<p>这是在我苹果本子上登录的提示，一般初次登录，会提示你接受一个密钥用于双方的加密数据传输，这个时候输入<strong>yes</strong>就行，输入<strong>y</strong>的话会提示错误，之后输入密码，如果正确无误的话，我们就登录进去了。接下来准备下载那些备份文件：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># pwd  //确定当前位置</span>
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>example
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mkdir temp  //创建一个temp目录备用</span>
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd temp  //切换到temp目录</span>
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ls  //列出目录</span>
.<span style="color: #000000; font-weight: bold;">/</span> ..<span style="color: #000000; font-weight: bold;">/</span>
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># wget http://backups.dreamhost.com/2010-01-05-GQ2SRxxxxxxxxx -r --http-user={backup login user} --http-password={backup login password} </span>
<span style="color: #ff0000;">'{此处省略暴多的乱七八糟的提示}'</span>
Downloaded: <span style="color: #000000;">42</span> files, 397M <span style="color: #000000; font-weight: bold;">in</span> 1m 5s <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">6.11</span> MB<span style="color: #000000; font-weight: bold;">/</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span>
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;">#</span></pre></td></tr></table></div>

<p>这里用到的<strong>http://backups.dreamhost.com/2010-01-05-GQ2SRxxxxxxxxx、{backup login user}、{backup login password} </strong>均出自DH发给你提示备份成功的邮件。<br />
恩，我是通过wget抓取网页并且在本地重建的方式把备份服务器上的所有备份文件一次性下载下来的办法。通常在两个美国主机之间传输数据，基本上单位都是以“M（兆）”来计算的，我300多M的数据一分钟多点就全部搞定了。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ls</span>
.<span style="color: #000000; font-weight: bold;">/</span> ..<span style="color: #000000; font-weight: bold;">/</span> backups.dreamhost.com index.html
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd backups.dreamhost.com</span>
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #000000; font-weight: bold;">/</span>backups.dreamhost.com<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ls</span>
.<span style="color: #000000; font-weight: bold;">/</span> ..<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000;">2010</span>-01-05-GQ2SRxxxxxxxxx  
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #000000; font-weight: bold;">/</span>backups.dreamhost.com<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd 2010-01-05-GQ2SRxxxxxxxxx</span>
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #000000; font-weight: bold;">/</span>backups.dreamhost.com<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2010</span>-01-05-GQ2SRxxxxxxxxx<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ls</span>
.<span style="color: #000000; font-weight: bold;">/</span> ..<span style="color: #000000; font-weight: bold;">/</span> mysql  <span style="color: #c20cb9; font-weight: bold;">users</span></pre></td></tr></table></div>

<p>经过确认，我们下载下来的主要有两个目录，一个是「mysql」，里面存放你DH帐户的所有mysql数据库，一个是「users」，里面以ftp用户名为目录的方式存放了你的web文件，都是打包好的。到此为止，方法一的文件就全部迁移到新的HH主机上了，如果没有任何问题，请直接进入下一节，我们将讨论如何恢复这些迁移过来的数据。
</ul>
<ul>
<h4>迁移方法 二（对应备份二）<a name="#022"></a></h4>
<p>通过备份二那个繁琐的办法，我们搞定了自己的数据库和文件，并且打包为一个文件叫dh.tar.gz放在/home/delive目录下，那么，对应的，这个步骤就要相对简单了。</p>
<p>登录HH的SSH：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">21MBP:~ 21$ ssh user@example.com
The authenticity of host 'example.com (174.37.xxx.xx)' can't be established.
RSA key fingerprint is cc:bd:03:fc:f7:59:fe:96:90:82:44:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'example.com,174.37.xxx.xx' (RSA) to the list of known hosts.
example@example.com's password: 
example@example.com [~]#</pre></td></tr></table></div>

<p>登录进去以后，我们要新建一个目录用来存放我们的备份文件，这个同 迁移一 是一样的，</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># pwd  //确定当前位置</span>
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>example
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mkdir temp  //创建一个temp目录备用</span>
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd temp  //切换到temp目录</span>
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ls  //列出目录</span>
.<span style="color: #000000; font-weight: bold;">/</span> ..<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr></table></div>

<p>接下来我们就要把之前的备份文件弄过来了，这次简单了，直接在SSH里面通过ftp就搞定了，这里用到的用户名密码是你DH的用户名密码，不再是之前的备份邮件里面提到的那个，请谨记</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ftp your_dh_domain.com</span>
Connected to your_dh_domain.com.
<span style="color: #000000;">220</span> DreamHost FTP Server
<span style="color: #000000;">500</span> AUTH not understood
<span style="color: #000000;">500</span> AUTH not understood
KERBEROS_V4 rejected <span style="color: #c20cb9; font-weight: bold;">as</span> an authentication <span style="color: #7a0874; font-weight: bold;">type</span>
Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>your_dh_domain.com:hh_user<span style="color: #7a0874; font-weight: bold;">&#41;</span>: your_dh_user <span style="color: #ff0000;">'输入你的DH用户名'</span>
<span style="color: #000000;">331</span> Password required <span style="color: #000000; font-weight: bold;">for</span> delive.
Password: <span style="color: #ff0000;">'输入你的DH密码'</span>
<span style="color: #000000;">230</span> User delive logged in.
Remote system <span style="color: #7a0874; font-weight: bold;">type</span> is UNIX.
Using binary mode to transfer files.
<span style="color: #c20cb9; font-weight: bold;">ftp</span><span style="color: #000000; font-weight: bold;">&gt;</span> get dh.tar.gz
<span style="color: #7a0874; font-weight: bold;">local</span>: dh.tar.gz remote: dh.tar.gz
<span style="color: #000000;">227</span> Entering Passive Mode <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">67</span>,<span style="color: #000000;">205</span>,<span style="color: #000000;">61</span>,<span style="color: #000000;">244</span>,<span style="color: #000000;">208</span>,<span style="color: #000000;">60</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.
<span style="color: #000000;">150</span> Opening BINARY mode data connection <span style="color: #000000; font-weight: bold;">for</span> dh.tar.gz <span style="color: #7a0874; font-weight: bold;">&#40;</span>xxxxxx bytes<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000;">226</span> Transfer complete.
xxxxxxx bytes received <span style="color: #000000; font-weight: bold;">in</span> xx.xx seconds <span style="color: #7a0874; font-weight: bold;">&#40;</span>xxxx Kbytes<span style="color: #000000; font-weight: bold;">/</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #c20cb9; font-weight: bold;">ftp</span><span style="color: #000000; font-weight: bold;">&gt;</span> by
<span style="color: #000000;">221</span> Goodbye.
example<span style="color: #000000; font-weight: bold;">@</span>example.com <span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>temp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ls</span>
.<span style="color: #000000; font-weight: bold;">/</span> ..<span style="color: #000000; font-weight: bold;">/</span> dh.tar.gz</pre></td></tr></table></div>

<p>恩，文件在SSH里面通过FTP的方式从DH拉到HH了，接下来就是解压什么的，因为之前我们压缩过了，给个范例参考，根据自己的需要修改就成：<br />
example@example.com [~/temp]# <strong>tar zxf 文件名.tar.gz</strong>
</ul>
<p>总的来说，实际上在迁移这步，两种办法都差不多，只不过一个是通过wget下载，一个是用过ftp，而实际上后者这个ftp同样可以通过wget来替代，稍微麻烦的是方法一的文件多了点，而方法二比较干脆，就一个压缩包搞定。下面，我们要搞定的部署我们的新主机HH。</p>
<p><font color="red">[未完待续，余下部分便是数据恢复，还有目录整理。]</font></p>
---------------------------------------<ol class="footnotes"><li id="footnote_0_333" class="footnote">http://panel.dreamhost.com 登录，这个简称为DH面板</li></ol>]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-03/dreamhost-to-hawkhost-hosting-move-note.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Name.com Promo Code &#124; March 2010</title>
		<link>http://mr21.in/2010-03/name-com-promo-code-march-2010.html</link>
		<comments>http://mr21.in/2010-03/name-com-promo-code-march-2010.html#comments</comments>
		<pubDate>Tue, 02 Mar 2010 06:53:57 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[特惠快讯]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Name.com]]></category>
		<category><![CDATA[Promo]]></category>
		<category><![CDATA[TLD]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=334</guid>
		<description><![CDATA[2010年3月优惠码

Promo Code &#124; March
MARCH825 &#124; $8.25 .COM .NET .ME registrations //以$8.25的价格注册com/net/me域名

Previous one
Special Promo Code &#124; February
MACWORLD &#124; $8.99 .TEL registrations
Name.com&#8217;ll be runni... ]]></description>
			<content:encoded><![CDATA[<p>2010年3月优惠码</p>
<blockquote><p>
<strong>Promo Code | March</strong></p>
<p><strong>MARCH825</strong> | $8.25 .COM .NET .ME registrations //以$8.25的价格注册com/net/me域名
</p></blockquote>
<blockquote><p><strong>Previous one<br />
<a href="http://mr21.in/2010-02/tel-promo-code-name-com.html">Special Promo Code | February</a></strong></p>
<p><strong>MACWORLD</strong> | $8.99 .TEL registrations<br />
Name.com&#8217;ll be running that promo until the end of the month
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-03/name-com-promo-code-march-2010.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Windows to MacOSX</title>
		<link>http://mr21.in/2010-03/win-to-mac.html</link>
		<comments>http://mr21.in/2010-03/win-to-mac.html#comments</comments>
		<pubDate>Mon, 01 Mar 2010 13:10:05 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[MBP]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=328</guid>
		<description><![CDATA[新近购置了MacBook Pro MB990，正式开始接触Mac OS X了。
自从有电脑开始，接触各种不同的系统就是我的一大爱好和谈资，不过实际上能做到实际应用的也就只有Windows了，环境使然，而这次购入的MB... ]]></description>
			<content:encoded><![CDATA[<p>新近购置了MacBook Pro MB990，正式开始接触Mac OS X了。<br />
自从有电脑开始，接触各种不同的系统就是我的一大爱好和谈资，不过实际上能做到实际应用的也就只有Windows了，环境使然，而这次购入的MBP的，我坚持不使用BootCamp，直接就把硬盘分区两个（这会导致你无法使用BootCamp安装Windows），不过为了网银还是安装了一个PD5（Parallel Desktop 5），基本上没有遇到多少障碍，这篇文字的目的就是稍微总结一下自己从Windows迁移到MacOSX后使用上的一些习惯变更和两个系统上的不同，不过不会太深层。</p>
<p>以下是记录内容，会不断更新，就不新开Post了，因为近似于草稿，会有些混乱，见谅 <img src='http://mr21.in/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
<h3><strong>Tips 1. 关于常用按键</strong></h3>
<p>MBP的键盘上相比于PC本子，少了不少常用的按键，即使这些按键我不认为是PC专用的，但实际上就是没有，并且明确的组合键提示也没有，所以记录一下。</p>
<blockquote><p>
<img src="http://static.zooomr.com/images/8955014_4e6fa3573f_o.png" width="432" height="243" alt="屏幕快照 2010-03-01 下午09.03.31" />
</p></blockquote>
<p>比较奇特的是，不是每个软件都管用的， 不过至少在Firefox是这样用的，<br />
然后在textedit.app里面的话，Shift+Fn+← 可以实现选中当前文字到顶端的效果。</p>
<h3><strong>Tips 2. 让F1~F12正常用，还有Tab</strong></h3>
<div class="imgdivimg2"><a href="http://www.zooomr.com/photos/cmb/8956957/" title="Photo Sharing"><img src="http://static.zooomr.com/images/8956957_1f6267b23e_m.jpg" width="240" height="132" alt="屏幕快照 2010-03-02 下午07.13.47" /></a></div>
<p>我承认这12个按键其实我更喜欢以苹果功能键的方式出现，音量控制、键盘背光、屏幕亮度、Dashboard我都用得非常频繁，但是也有人喜欢以F键出现，那就F键好了，设置一下就行了。</p>
<p><strong>系统偏好设置 -> 键盘 -> 键盘</strong>，选择“<strong>将F1、F2等键用做标准功能键</strong>”，钩上就行，放心，虽然示例说的是F1、F2，实际上是针对所有F键的，搞定。<br />
这样的设置，在不用BootCamp、装虚拟机Windows的情况下比较实用，毕竟我还是非常习惯Ctrl+F5搞强制刷新，F2更名，F3搜索，F6切换选择域的。</p>
<p>顺便说一下，默认情况下，<strong>Tab键</strong>你会发现很难用，大多数地方都按了没反应，ok，这么操作，<strong>Fn+Control+F7</strong>，按一下就行，然后Tab就会变得很好用了。</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-03/win-to-mac.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>雪豹内置读写NTFS-NTFS Mounter</title>
		<link>http://mr21.in/2010-02/ntfs-mounter-with-snow-leopard-inside-function.html</link>
		<comments>http://mr21.in/2010-02/ntfs-mounter-with-snow-leopard-inside-function.html#comments</comments>
		<pubDate>Tue, 16 Feb 2010 15:04:26 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[NTFS]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=331</guid>
		<description><![CDATA[名称：NTFS Mounter 
平台：Mac OS X 10.6.x
下载：http://ntfsmounter.com/
介绍：虽然雪豹内嵌了ntfs的读写功能，但是官方并没有直接给出使用方法，这个小工具通过调用内置的ntfs读写功能来实现ntfs分区... ]]></description>
			<content:encoded><![CDATA[<p>名称：NTFS Mounter <span style="float:right;"><img src="http://ntfsmounter.com/logo.png" alt="" /></span><br />
平台：Mac OS X 10.6.x<br />
下载：<a href="http://ntfsmounter.com/">http://ntfsmounter.com/</a><br />
介绍：虽然雪豹内嵌了ntfs的读写功能，但是官方并没有直接给出使用方法，这个小工具通过调用内置的ntfs读写功能来实现ntfs分区的读写，支持系统硬盘上的分区与移动硬盘。</p>
<blockquote><p><strong>使用方法简述：</strong></p>
<p><strong>Step. 1</strong><br />
下载的app拖放到任何地方，执行，然后在菜单栏就会有以下图标：<br />
<a href="http://www.zooomr.com/photos/cmb/8919150/" title="Photo Sharing"><img src="http://static.zooomr.com/images/8919150_d8c8a5aa4d_s.jpg" width="25" height="25" alt="ntfs1" /></a></p>
<p><strong>Step. 2</strong><br />
点击这个猫头，会自动识别你磁盘上或者移动硬盘上的ntfs分区，选择该分区就会执行“挂载为可读写”（remount to rewritable），如果没有ntfs分区，则显示下图：<br />
<a href="http://www.zooomr.com/photos/cmb/8919151/" title="Photo Sharing"><img src="http://static.zooomr.com/images/8919151_beedd6c916_o.png" width="235" height="121" alt="ntfs2" style="margin-left:-27px;" /></a></p>
<p><strong>Step. 3</strong><br />
移除方式跟常规的办法一样。</p></blockquote>
<p><del datetime="2010-02-18T19:17:08+00:00"><strong>注意：</strong>在非Windows系统下读写ntfs分区是一件比较危险的事情，不建议频繁使用。</del><br />
根据kyt30留言，我搜索了ntfs3g相关的资讯，基本上来，比较安全稳定可信，而Mac OS X在雪豹(Snow Leopard)之前的版本大多数人也是喜欢通过ntfs3g或者paragon ntfs来解决ntfs格式的读写问题的，总体来看也是问题不多。并且，SL内置的NTFS读写功能确实存在一定的缺陷，会弄坏你的FAT(文件分配表)，让你的系统找不到任何文件（不论是SL还是Windows），这个功能还是偶尔一用就好了，如果长期需要使用ntfs分区格式的读写，建议安装ntfs3g或者paragon ntfs。</p>
<p>如果你开启了SL内置的读写并且发生了FAT损坏的情况，请移步Windows，执行“开始，运行”，填入“<strong>chkdsk 盘符 /f</strong>”，一般来说可以恢复的。</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-02/ntfs-mounter-with-snow-leopard-inside-function.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>24家最大电信运营商结盟对抗苹果</title>
		<link>http://mr21.in/2010-02/24-telecom-provider-anti-apple.html</link>
		<comments>http://mr21.in/2010-02/24-telecom-provider-anti-apple.html#comments</comments>
		<pubDate>Tue, 16 Feb 2010 10:31:12 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[二一视点]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[移动]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=329</guid>
		<description><![CDATA[呃，我不算标题党，只是看到了突然想表达一句话观点：
大家对没有任何背景的独家专营开拓市场的始祖开始眼馋了，要求分羹……
再牢骚一句：开拓市场的时候，这24家躲在哪里？特别是中... ]]></description>
			<content:encoded><![CDATA[<p>呃，我不算标题党，只是看到了突然想表达一句话观点：<br />
大家对没有任何背景的独家专营开拓市场的始祖开始眼馋了，要求分羹……<br />
再牢骚一句：开拓市场的时候，这24家躲在哪里？特别是中移动还有份，说到模仿和眼馋，腾讯做的比较好。</p>
<blockquote><p>
<strong>原文如下：</strong><br />
luoluolulu 写道 &#8221; 包括AT&#038;T、中国电信、Orange、沃达丰和新加坡电信(Singtel)在内世界上最大的24家电信运营商已经联合起来组成统一战线和目前在移动通信应用占主导地位的苹果进行较量。这个组织称作&#8221;Wholesale Applications Community&#8221;(WAC)，目的是允许开发者对所有移动电话用户提供应用程序，而&#8221;无关设备和技术&#8221;。这次行动被看作是这些电信巨头们试图从新夺回被苹果iPhone和iTune App Store占据的移动软件市场。<br />
From <a href="http://apple.solidot.org/article.pl?sid=10/02/16/0230201">Solidot</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-02/24-telecom-provider-anti-apple.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.TEL Promo Code &#124; Name.com</title>
		<link>http://mr21.in/2010-02/tel-promo-code-name-com.html</link>
		<comments>http://mr21.in/2010-02/tel-promo-code-name-com.html#comments</comments>
		<pubDate>Sun, 14 Feb 2010 10:13:15 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[特惠快讯]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Name.com]]></category>
		<category><![CDATA[Promo]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=326</guid>
		<description><![CDATA[2010年2月特别优惠码
Special Promo Code &#124; February
MACWORLD &#124; $8.99 .TEL registrations
Name.com&#8217;ll be running that promo until the end of the month


Previous one
Promo Code &#124; February
CRUSHIT  //本月Name.com开放了一个... ]]></description>
			<content:encoded><![CDATA[<p>2010年2月特别优惠码</p>
<blockquote><p><strong>Special Promo Code | February</strong></p>
<p><strong>MACWORLD</strong> | $8.99 .TEL registrations<br />
Name.com&#8217;ll be running that promo until the end of the month
</p></blockquote>
<blockquote><p>
<strong>Previous one<br />
<a href="http://mr21.in/2010-02/name-com-promo-code-february-2010.html">Promo Code | February</a></strong></p>
<p><strong>CRUSHIT</strong>  //本月Name.com开放了一个优惠码CRUSHIT，有以下用途：<br />
<strong>$8.09 .COM/.NET registrations</strong>  //以优惠价8.09美金注册.COM/.NET域名<br />
<strong>$20.66 .TV registrations</strong>  //以优惠价20.66美金注册.TV域名<br />
<strong>15% off all hosting plans (monthly and yearly)</strong>  //购买任何空间将优惠15%（支持月付和年付）
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-02/tel-promo-code-name-com.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Lunar New Year!</title>
		<link>http://mr21.in/2010-02/happy-2010-lunar-new-year.html</link>
		<comments>http://mr21.in/2010-02/happy-2010-lunar-new-year.html#comments</comments>
		<pubDate>Sat, 13 Feb 2010 10:48:22 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[二一视点]]></category>
		<category><![CDATA[Lunar New Year]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=324</guid>
		<description><![CDATA[虎年新春Mr. 21恭祝各位：
　　新春快乐！阖家幸福！
呈上QQ群里面疯传的图片一张：
... ]]></description>
			<content:encoded><![CDATA[<p>虎年新春Mr. 21恭祝各位：<br />
<strong>　　新春快乐！阖家幸福！</strong></p>
<p>呈上QQ群里面疯传的图片一张：<br />
<a href="http://www.zooomr.com/photos/cmb/8905004/" title="Photo Sharing"><img src="http://static.zooomr.com/images/8905004_528c8a226c_b.jpg" width="500" alt="lunar-new-year" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-02/happy-2010-lunar-new-year.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Name.com Promo Code &#124; February 2010</title>
		<link>http://mr21.in/2010-02/name-com-promo-code-february-2010.html</link>
		<comments>http://mr21.in/2010-02/name-com-promo-code-february-2010.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 14:07:56 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[特惠快讯]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Name.com]]></category>
		<category><![CDATA[Promo]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=323</guid>
		<description><![CDATA[2010年2月Name.com最新优惠码

Promo Code &#124; February
CRUSHIT  //本月Name.com开放了一个优惠码CRUSHIT，有以下用途：
$8.09 .COM/.NET registrations  //以优惠价8.09美金注册.COM/.NET域名
$20.66 .TV registrations  //以优... ]]></description>
			<content:encoded><![CDATA[<p>2010年2月Name.com最新优惠码</p>
<blockquote><p>
<strong>Promo Code | February</strong></p>
<p><strong>CRUSHIT</strong>  //本月Name.com开放了一个优惠码CRUSHIT，有以下用途：<br />
<strong>$8.09 .COM/.NET registrations</strong>  //以优惠价8.09美金注册.COM/.NET域名<br />
<strong>$20.66 .TV registrations</strong>  //以优惠价20.66美金注册.TV域名<br />
<strong>15% off all hosting plans (monthly and yearly)</strong>  //购买任何空间将优惠15%（支持月付和年付）
</p></blockquote>
<blockquote><p>
<strong>Promo Code | January</strong><br />
PROMO19735 | $8.25 COM Registration<br />
PROMO71403 | $8.20 COM/NET Renewal<br />
PROMO04582 | $8.15 INFO/ORG Renewal
</p></blockquote>
<p>上个月以为以后的优惠码会统一格式的，没想到真是统一了，统一成一个……<br />
Mr. 21提供的Name.com优惠码均是官方提供正品，不存在<strong>返点</strong>和<strong>虚假</strong>等问题，可以随便使用。</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-02/name-com-promo-code-february-2010.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2010苹果“最新创意”新品发布会直播</title>
		<link>http://mr21.in/2010-01/live-coverage-of-the-apple-latest-creation-event.html</link>
		<comments>http://mr21.in/2010-01/live-coverage-of-the-apple-latest-creation-event.html#comments</comments>
		<pubDate>Wed, 27 Jan 2010 15:37:43 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[业界时讯]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[升级]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=322</guid>
		<description><![CDATA[Live coverage of the Apple &#8216;latest creation&#8217; event.
The event starting times around the globe:
08:00AM &#8211; Hawaii / 10:00AM &#8211; Pacific
11:00AM &#8211; Mountain / 12:00PM &#8211; Central
01:00PM &#8211; Eastern / 06:00PM &#8211; Londo... ]]></description>
			<content:encoded><![CDATA[<p><strong>Live coverage of the Apple &#8216;latest creation&#8217; event.</strong></p>
<blockquote><p><strong>The event starting times around the globe:</strong></p>
<p>08:00AM &#8211; Hawaii / 10:00AM &#8211; Pacific<br />
11:00AM &#8211; Mountain / 12:00PM &#8211; Central<br />
01:00PM &#8211; Eastern / 06:00PM &#8211; London<br />
07:00PM &#8211; Paris / 09:00PM &#8211; Moscow<br />
03:00AM &#8211; Tokyo (January 28th)</p></blockquote>
<p><center><iframe height="550" src="http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=19362c51f6/height=550/width=470" frameborder="0" width="470" allowtransparency="allowtransparency" scrolling="no"><a href="http://www.coveritlive.com/mobile.php?option=com_mobile&#038;task=viewaltcast&#038;altcast_code=19362c51f6" >Apple &#8216;latest creation&#8217; event</a></iframe></center></p>
<p>来自<a href="http://www.cnbeta.com/articles/103076.htm">cnBeta</a>的文字直播，据说会场是不允许现场视频直播的。</p>
<p>PS. 苹果网直播会场，据说是在会场附近的，还有照片。<a href="http://live.macx.cn/">http://live.macx.cn/</a></p>
<p>我是因为在观望MacBook Pro MB990的升级，如果这次升级值得等半个月铺货，那就等等吧，<br />
如果升级幅度过小，那就明天下手，MB990，我看好你哟~</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-01/live-coverage-of-the-apple-latest-creation-event.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sixth Sense，很棒的交互</title>
		<link>http://mr21.in/2010-01/sixth-sense-the-best-user-interface.html</link>
		<comments>http://mr21.in/2010-01/sixth-sense-the-best-user-interface.html#comments</comments>
		<pubDate>Sun, 24 Jan 2010 07:58:35 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[业界时讯]]></category>
		<category><![CDATA[Sixth Sense]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=321</guid>
		<description><![CDATA[看到这段视频，希望这样的生活不会里我太远，我觉得未来理应如此，非常之期待！
就像我偶尔的突发奇想，说可以把两个屏幕之间的东西进行拖拽转移，不过很明显我没有实现这种想法的能... ]]></description>
			<content:encoded><![CDATA[<p>看到这段视频，希望这样的生活不会里我太远，我觉得未来理应如此，非常之期待！<br />
就像我偶尔的突发奇想，说可以把两个屏幕之间的东西进行拖拽转移，不过很明显我没有实现这种想法的能力，而视频里面展示的“第六感”完全突破了常规的想象，听我说没用，看视频。</p>
<p><center><embed src="http://player.youku.com/player.php/sid/XMTQxNzY2MDUy/v.swf" quality="high" width="480" height="400" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed></center></p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-01/sixth-sense-the-best-user-interface.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>百度应急访问解析</title>
		<link>http://mr21.in/2010-01/biadu-emergency-solution.html</link>
		<comments>http://mr21.in/2010-01/biadu-emergency-solution.html#comments</comments>
		<pubDate>Tue, 12 Jan 2010 03:15:53 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[網際網路]]></category>
		<category><![CDATA[Baidu]]></category>
		<category><![CDATA[Hosts]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=316</guid>
		<description><![CDATA[新闻早报，据说百度被攻陷了，NS被攻陷了。好吧，又是Hosts了。
请打开记事本或者新建一个文本文档，然后复制以下内容进去

echo+ &#62;&#62; %windir%\system32\drivers\etc\hosts
echo 202.108.22.5   www.baidu.co... ]]></description>
			<content:encoded><![CDATA[<p>新闻早报，据说百度被攻陷了，NS被攻陷了。好吧，又是Hosts了。</p>
<p>请打开记事本或者新建一个文本文档，然后复制以下内容进去</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span>+ <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">%</span>windir<span style="color: #000000; font-weight: bold;">%</span>\system32\drivers\etc\hosts
<span style="color: #7a0874; font-weight: bold;">echo</span> 202.108.22.5   www.baidu.com baidu.com <span style="color: #000000; font-weight: bold;">&gt;&gt;%</span>windir<span style="color: #000000; font-weight: bold;">%</span>\system32\drivers\etc\hosts
start http:<span style="color: #000000; font-weight: bold;">//</span>baidu.com</pre></div></div>

<p>然后，<strong>文件->另存为</strong>，<strong>保存类型</strong>为“<u>所有文件</u>”，起名<strong>baidu.cmd</strong>，<br />
然后，Win2000/XP可以双击baidu.cmd使用，WinVista/7请文件上<strong>右键</strong>选择“以管理员身份运行”，<br />
运行完即可。</p>
<p>然后是，<a href="http://www.beishan.info">老卫</a>说我最近改Hosts改上瘾了……<br />
以下部分是笑话，请参考~</p>
<blockquote><p>RT @lengxiaohua: 百度被黑的真正原因是：伊朗圣战军的新任领袖阿卜杜.阿卜杜拉（abaidu.abaidula)看百度不爽，犯了名讳：）</p></blockquote>
<blockquote><p><img src="http://mr21.in/wp-content/uploads/2010/01/bd.jpg" alt="" /></p></blockquote>
<blockquote><p>RT @Showfom: Baidu公司注册于英属开曼群岛，Baidu的创始人李彦宏持有美国绿卡，Baidu启动的资金是美国的风险投资，现在美资在Baidu中占有51%以上的份额，所以百度是一家地地道道的美资公司。所以伊朗人才不惜代价干掉了百度。</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-01/biadu-emergency-solution.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>BlogBus应急方案复原</title>
		<link>http://mr21.in/2010-01/hosts-for-bus-come-back.html</link>
		<comments>http://mr21.in/2010-01/hosts-for-bus-come-back.html#comments</comments>
		<pubDate>Mon, 11 Jan 2010 15:45:25 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[博客贴士]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[BlogBus]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[翻墙]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=313</guid>
		<description><![CDATA[各位访问Mr. 21并且获得帮助的乘客们，很高兴大巴在明天能恢复启程，
而我之前的教程让大家修改了Hosts文件，现在我提供一个恢复的脚本，请按照说明使用。
脚本名称： Hosts_BusComeBack
适用范... ]]></description>
			<content:encoded><![CDATA[<p>各位访问Mr. 21并且获得帮助的乘客们，很高兴大巴在明天能恢复启程，<br />
而我之前的教程让大家修改了Hosts文件，现在我提供一个恢复的脚本，请按照说明使用。</p>
<blockquote><p><strong>脚本名称：</strong> Hosts_BusComeBack<br />
<strong>适用范围：</strong> Windows 2000/XP/Vista/7<br />
<strong>使用条件：</strong> 等到Bus确认恢复运作后再使用，否则你又得再用一次BusHosts<br />
<strong>使用方法：</strong> Win2000/XP可以直接使用，WinVista/7请解压后在文件上<strong>右键</strong>选择“以管理员身份运行”。<br />
<strong>简单说明：</strong> 使用这个脚本将恢复系统本身默认的Hosts文件，如果你的Hosts文件有其它特殊配置，请注意备份。<br />
<strong>使用后果：</strong> 除了系统默认的记录外，Hosts文件不会再存在额外的东西，也就说无法再“翻墙”访问Bus。<br />
<strong>下载地址：</strong> <a href="/wp-content/uploads/2010/01/hosts_BusComeBack.zip">http://mr21.in/wp-content/uploads/2010/01/hosts_BusComeBack.zip</a><br />
<strong>注意事项：</strong> <strong style="color:red;">使用之后，请重新开启你的浏览器或者重新启动电脑，后者最保险。</strong></p></blockquote>
<blockquote><p>关于一点很抱歉，<br />
就是Linux/Mac OS X用户，如果你有改动，需要手动去除原来添加的代码了，Hosts文件一般保留下面一行即可：<br />
<strong>127.0.0.1 localhost</strong><br />
或者在终端中（Terminal）运行下面一行命令，只要你权限够<br />
<strong>sudo echo 127.0.0.1 localhost > /etc/hosts</strong> 或 <strong>echo 127.0.0.1 localhost > /etc/hosts</strong></p></blockquote>
<p>如果有Bus的用户想考虑独立博客，可以点击<a href="http://s.click.taobao.com/t_1?i=qvFcRUSA%2Fu2W2Q%3D%3D&#038;p=mm_15117278_0_0&#038;n=11">虚拟主机 Plan-2 WordPress</a>了解，目前是2月底前会多赠送一个月。<br />
同时可以QQ联系我，随时为大家提供帮助。</p>
<p>以下部分为脚本源代码，仅供高级用户参考交流，一般用户请不用理会。<br />
<span id="more-313"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span> off
color 0a
goto start
&nbsp;
:start
cls
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span>  以下每个操作都需要在输入完成后按回车。
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span>+
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span>  请选择本机系统：Win2000<span style="color: #000000; font-weight: bold;">/</span>XP（按<span style="color: #000000;">1</span>）或WinVista<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7</span>（按<span style="color: #000000;">2</span>）或退出（按Q）
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #000000; font-weight: bold;">/</span>p <span style="color: #007800;">ossel</span>=
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%ossel%&quot;</span> == <span style="color: #ff0000;">&quot;q&quot;</span> <span style="color: #7a0874; font-weight: bold;">exit</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%ossel%&quot;</span> == <span style="color: #ff0000;">&quot;Q&quot;</span> <span style="color: #7a0874; font-weight: bold;">exit</span>
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span>  即将开始恢复本机默认Hosts文件，这将导致Bus的翻墙失效，是否继续<span style="color: #7a0874; font-weight: bold;">&#40;</span>Y or N<span style="color: #7a0874; font-weight: bold;">&#41;</span>？
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #000000; font-weight: bold;">/</span>p <span style="color: #007800;">answer</span>=
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%ossel%&quot;</span> == <span style="color: #ff0000;">&quot;1&quot;</span> goto 2p
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%ossel%&quot;</span> == <span style="color: #ff0000;">&quot;2&quot;</span> goto v7
&nbsp;
:2p
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%answer%&quot;</span> == <span style="color: #ff0000;">&quot;y&quot;</span> goto yes2p
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%answer%&quot;</span> == <span style="color: #ff0000;">&quot;Y&quot;</span> goto yes2p
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%answer%&quot;</span> == <span style="color: #ff0000;">&quot;n&quot;</span> goto start
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%answer%&quot;</span> == <span style="color: #ff0000;">&quot;N&quot;</span> goto start
&nbsp;
:v7
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%answer%&quot;</span> == <span style="color: #ff0000;">&quot;y&quot;</span> goto yesv7
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%answer%&quot;</span> == <span style="color: #ff0000;">&quot;Y&quot;</span> goto yesv7
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%answer%&quot;</span> == <span style="color: #ff0000;">&quot;n&quot;</span> goto start
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #ff0000;">&quot;%answer%&quot;</span> == <span style="color: #ff0000;">&quot;N&quot;</span> goto start
&nbsp;
:yes2p
<span style="color: #7a0874; font-weight: bold;">echo</span> 127.0.0.1	localhost <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">%</span>windir<span style="color: #000000; font-weight: bold;">%</span>\system32\drivers\etc\hosts
goto end
&nbsp;
:yesv7
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">127.1</span>		<span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">%</span>windir<span style="color: #000000; font-weight: bold;">%</span>\system32\drivers\etc\hosts
<span style="color: #7a0874; font-weight: bold;">echo</span> 127.0.0.1	localhost <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">%</span>windir<span style="color: #000000; font-weight: bold;">%</span>\system32\drivers\etc\hosts
<span style="color: #7a0874; font-weight: bold;">echo</span> 127.0.0.1	localhost.localdomain <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">%</span>windir<span style="color: #000000; font-weight: bold;">%</span>\system32\drivers\etc\hosts
<span style="color: #7a0874; font-weight: bold;">echo</span> 127.0.0.1	localhost <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">%</span>windir<span style="color: #000000; font-weight: bold;">%</span>\system32\drivers\etc\hosts
<span style="color: #7a0874; font-weight: bold;">echo</span> ::<span style="color: #000000;">1</span>             localhost <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">%</span>windir<span style="color: #000000; font-weight: bold;">%</span>\system32\drivers\etc\hosts
goto end
&nbsp;
:end
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span>  恢复完成，按任意键退出。
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span>+
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span>  如果你又突然需要BusHosts解析，请访问我的博客 http:<span style="color: #000000; font-weight: bold;">//</span>mr21.in
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span>  脚本编写：Mr. <span style="color: #000000;">21</span>
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">echo</span>+
pause</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-01/hosts-for-bus-come-back.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Blogbus导出日志的XML文件格式分析</title>
		<link>http://mr21.in/2010-01/the-xml-file-format-analysis-from-blogbus-backups.html</link>
		<comments>http://mr21.in/2010-01/the-xml-file-format-analysis-from-blogbus-backups.html#comments</comments>
		<pubDate>Sun, 10 Jan 2010 10:36:01 +0000</pubDate>
		<dc:creator>Mr. 21</dc:creator>
				<category><![CDATA[博客贴士]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[BlogBus]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=310</guid>
		<description><![CDATA[From 孙楠的技术讲堂@Blogbus
鉴于大多数人目前是没有办法正常访问Blogbus的，我转帖过来，请作者谅解。
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
Blog... ]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://sunnantechnology.blogbus.com/logs/32745724.html">孙楠的技术讲堂@Blogbus</a><br />
鉴于大多数人目前是没有办法正常访问Blogbus的，我转帖过来，请作者谅解。<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Blogbus有一个很不错的功能“导出日志”，该功能可以将你所有的博客文章导出为XML格式以便备份和编辑。今天我们就来讲一讲导出日志的XML文件格式。</p>
<p>首先我们把自己的博客导出，步骤如下：<br />
1、登录blogbus<br />
2、选择博客->博客设置->导入导出->点这里导出日志<br />
3、保存XML文件</p>
<p>然后我们就可以分析XML文件格式了，用IE，Firefox或Visual Studio将备份文件打开，便可以看到它的结构：<span id="more-310"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;blogbuscom</span> <span style="color: #000066;">dtype</span>=<span style="color: #ff0000;">&quot;BlogData&quot;</span> <span style="color: #000066;">SchemaVersion</span>=<span style="color: #ff0000;">&quot;1.1&quot;</span> <span style="color: #000066;">Creator</span>=<span style="color: #ff0000;">&quot;BlogBus.Com BlogSystem V4.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
// 导出文件的数据类型，版本和出处
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 博客描述
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;blogname<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>博客名称，例如：孙楠的技术讲堂<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/blogname<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;domainname<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>博客地址，例如：sunnantechnology.blogbus.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/domainname<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exporttime<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>导出的时间，格式为：2008-12-20 15:43:26<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exporttime<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 描述结束
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;log<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 博客日志
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>日志标题，例如：Blogbus导出日志的XML文件格式分析<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;status<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>日志状态，控制隐藏和置顶，隐藏为0，正常为1，置顶为2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/status<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;allowcomment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>评论，Y为允许，N为不允许<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/allowcomment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;allowping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>引用，Y为允许，N为不允许<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/allowping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;allowlinks<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>自动链接，Y为允许，N为不允许<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/allowlinks<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;writer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>作者姓名，可以为空<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/writer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sort<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>分类，为什么用Sort，Catalog不是更好?<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sort<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>日志内容，包括html格式<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;excerpt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>日志摘要，包括html格式<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/excerpt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tags<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>关键词，关键词之间用空格分隔<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tags<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;logdate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>日志时间，格式为：2008-04-17 13:40:00<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/logdate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;comments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 这个标记做什么用？可以省略吗？
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;comment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 博客评论
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;email<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>评论者的邮件地址<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/email<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;homepage<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>评论者的主页地址<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/homepage<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;createtime<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>评论时间，格式为：2008-12-19 21:45:48<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/createtime<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nicename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>评论者的姓名<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nicename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;commenttext<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>评论的内容和回复，无html格式<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/commenttext<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/comment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 评论结束
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;comment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/comment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 更多评论
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/comments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 这个标记做什么用？可以省略吗？
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/log<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 日志结束
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;log<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/log<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 更多日志
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/blogbuscom<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> // 导出文件结束</pre></td></tr></table></div>

<p>Blogbus的XML导出文件结构简单清晰，易读易维护，设计得不错。但是关于&lt;Comments>&lt;/Comments>这个标记，真的需要吗？</p>
<p>1、首先不可能是排序用，日志和评论都以时间排序，而时间都已经有了相应的标记<br />
2、如果是要把评论按照每篇日志分开，似乎也没有必要，毕竟每个&lt;Comment>&lt;/Comment>都在&lt;Log>&lt;/Log>里面</p>
<p>思来想去，我感觉比较可能的作用是，在批量处理评论的操作中，可以节省时间。操作数可以从评论条数，减少到日志条数。但是从算法来说，都是O(n)，真正效果如何，就要实测了。</p>
<p>另外：<br />
1、日志的顺序可能与博客上看到的顺序不同，但是不会影响导入后的结果。这是由XML的特性决定的。<br />
2、有了XML可以批量删除不必要的html标记，比如将>&#038;nbsp ;< 批量替换为><，也可以把搬家时丢失的评论加进去，当然最重要的功能还是存档啦。</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/2010-01/the-xml-file-format-analysis-from-blogbus-backups.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
