<?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>iPUNKID &#187; dreamhost</title>
	<atom:link href="http://blog.punkid.org/tag/dreamhost/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.punkid.org</link>
	<description>To ∞ and Beyond</description>
	<lastBuildDate>Sun, 29 Jan 2012 13:02:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Backup Your Files Hierarchically to Dreamhost via Rsync</title>
		<link>http://blog.punkid.org/2008/10/29/backup-your-files-hierarchically-to-dreamhost-via-rsync/</link>
		<comments>http://blog.punkid.org/2008/10/29/backup-your-files-hierarchically-to-dreamhost-via-rsync/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 06:18:10 +0000</pubDate>
		<dc:creator>iPUNKID</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://blog.punkid.org/?p=263</guid>
		<description><![CDATA[There&#8217;re some easy file backup n&#8217; sync online services such as Amazon S3 and Dropbox, however I find it not so handy when I want to sync my linux files hierarchially. I initially used git to sync my .vimrc file and my own ebuild repo, but it is not cost-efficient as I actually pay little [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;re some easy file backup n&#8217; sync online services such as <a href="http://aws.amazon.com/s3/" title="Amazon S3">Amazon S3</a> and <a href="https://www.getdropbox.com/" title="Dropbox">Dropbox</a>, however I find it not so handy when I want to sync my linux files hierarchially.</p>
<p>I initially used git to sync my <code>.vimrc</code> file and my own ebuild repo, but it is not cost-efficient as I actually pay little attention to the tracking commit things. So I ended up using rsync to synchronize my linux files to my dreamhost account.</p>
<h3>Preparation</h3>
<p>Assuming you&#8217;ve already had a dreamhost account with shell access priviledge (any other hosts with shell access will be fine as well). And you&#8217;re going to backup the following files on your system to the dreamhost server:<br />
<span id="more-263"></span></p>
<pre>
/home/yourname/.aliasrc
/home/yourname/.bashrc
/home/yourname/.config/openbox/
/home/yourname/files/
/home/yourname/.vimrc
/home/yourname/.vim/
/home/yourname/.xinitrc
/home/yourname/.Xdefaults
/etc/fstab
/etc/fonts/local.conf
/etc/make.conf
/etc/portage/package.*
/etc/X11/xorg.conf
</pre>
<p>Ofc you dont want others to see your <code>loveletter.txt</code> and <code>bankaccount.txt</code> under <code>files</code> directory, so the two files should be excluded from synchronization.</p>
<p>Put the following two lines into a textfile (such as <code>~/.rsync/excludes</code>) which we&#8217;ll use it later:</p>
<pre>
/home/yourname/files/loveletter.txt
/home/yourname/files/bankaccount.txt
</pre>
<h3>Howto</h3>
<p>I wrote this script for sync:</p>
<pre>
#!/bin/bash

includes="
/home/yourname/.aliasrc
/home/yourname/.bashrc
/home/yourname/.config/openbox/
/home/yourname/files/
/home/yourname/.vimrc
/home/yourname/.vim/
/home/yourname/.xinitrc
/home/yourname/.Xdefaults
/etc/fstab
/etc/fonts/local.conf
/etc/make.conf
/etc/portage/package.*
/etc/X11/xorg.conf
"

rsync -avzuCRpP --delete --delete-excluded $includes --exclude-from "/home/yourname/.rsync/excludes" -e ssh USERNAME@HOSTNAME:linux/
</pre>
<p>The <code>$includes</code> contains the files you want to sync, * wildcard supported, and to exclude the private files you&#8217;ll need the <code>--exclude-from</code> paramater.</p>
<p><code>USERNAME@HOSTNAME</code> is your dreamhost account and hostname, <code>:linux/</code> means sync the files to the linux directory under your dreamhost home directory.</p>
<p><code>-a</code> parameter makes sure your files will be synchronized recursively.</p>
<p><code>-C</code> is used for ignoring files like <code>.git</code>, <code>.svn</code>, <code>*.bak</code> and so on, ofc we dont want to waste time on transfering these useless things.</p>
<p><code>-R</code> is needed for transfering hierarchically, this means I can sync my <code>/etc/make.conf </code>file right under <code>linux/etc/</code> directory on my dreamhost.</p>
<p><code>-P</code> parameter is quite useful when the transaction is interrupted, you can continue the process somewhen later.</p>
<p>Now you can <code>chmod +x scriptname</code> before you run it first time.</p>
<p>Fetch the backup files from your dreamhost is easy, just to run:</p>
<pre>
rsync -e ssh -av USERNAME@HOSTNAME:linux/ backup/
</pre>
<p>The files will be transfered to the <code>backup</code> directory on the local computer.</p>
<p>You may need the <a href="http://www.debian-administration.org/articles/152" title="Password-less logins with OpenSSH">Password-less SSH Login</a> if you want to add this script to the cron job.</p>
<p>I use this cron job to make sure the script run automatically at 23:30 p.m. on every Monday and Thursday.</p>
<pre>
30 23 * * 1,4   punkid   sh /home/punkid/scripts/autobackup.sh
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.punkid.org/2008/10/29/backup-your-files-hierarchically-to-dreamhost-via-rsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Dreamhost主机上搭建Git</title>
		<link>http://blog.punkid.org/2008/03/28/howto-setup-git-repo-on-dreamhost/</link>
		<comments>http://blog.punkid.org/2008/03/28/howto-setup-git-repo-on-dreamhost/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 07:14:58 +0000</pubDate>
		<dc:creator>iPUNKID</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://blog.punkid.org/2008/03/28/howto-setup-git-repo-on-dreamhost/</guid>
		<description><![CDATA[假设你已经在本地搭建了一个git repository，现在需要把它上传到dreamhost主机上提供给别人pull，并方便自己在不同电脑上更新使用。这是我目前用的方法，当然首先你得先知道以下东西(以下内容均为假设，表胡猜我的帐号，密码了:D) DH主机名: montty (假设) DH用户名: hades (需开通shell操作权限) 本地Git repo: /home/hades/software 1.在DH主机上安装Git ssh登陆DH主机，在主目录下进行以下操作安装Git $ mkdir src &#038;&#038; cd src/ $ wget http://kernel.org/pub/software/scm/git/git-1.5.4.4.tar.gz $ tar xzvf git-1.5.4.4.tar.gz $ cd git-1.5.4.4 $ ./configure --prefix=/home/hades/ NO_CURL=1 NO_MMAP=1 $ make &#038;&#038; make install 然后把生成的/home/hades/bin添加到系统环境中 $ echo "export PATH=/home/hades/bin:$PATH" &#62;&#62; ~/.bashrc 2.从本地拷贝一个空(bare)的repo出来 $ cd /home/hades $ git-clone --bare software software.git [...]]]></description>
			<content:encoded><![CDATA[<p>假设你已经在本地搭建了一个git repository，现在需要把它上传到dreamhost主机上提供给别人pull，并方便自己在不同电脑上更新使用。这是我目前用的方法，当然首先你得先知道以下东西(以下内容均为假设，表胡猜我的帐号，密码了:D)</p>
<ul>
<li>DH主机名: montty (假设)</li>
<li>DH用户名: hades (需开通shell操作权限)</li>
<li>本地Git repo: /home/hades/software</li>
</ul>
<p>1.在DH主机上安装Git</p>
<p>ssh登陆DH主机，在主目录下进行以下操作安装Git</p>
<pre lang="bash">
$ mkdir src &#038;&#038; cd src/
$ wget http://kernel.org/pub/software/scm/git/git-1.5.4.4.tar.gz
$ tar xzvf git-1.5.4.4.tar.gz
$ cd git-1.5.4.4
$ ./configure --prefix=/home/hades/ NO_CURL=1 NO_MMAP=1
$ make &#038;&#038; make install
</pre>
<p><span id="more-203"></span><br />
然后把生成的/home/hades/bin添加到系统环境中</p>
<pre lang="bash">
$ echo "export PATH=/home/hades/bin:$PATH" &gt;&gt; ~/.bashrc
</pre>
<p>2.从本地拷贝一个空(bare)的repo出来</p>
<pre lang="bash">
$ cd /home/hades
$ git-clone --bare software software.git
$ cd software.git/
$ git --bare update-server-info
$ chmod a+x hooks/post-update
$ touch git-daemon-export-ok
</pre>
<p>3.把这个<code>software.git</code>上传到DH主机上</p>
<pre lang="bash">
$ scp -r software.git hades@montty.dreamhost.com:/example.com/path/software.git
</pre>
<p>4.回到本地的原始Git repo目录，提交改变到DH主机的repo上</p>
<pre lang="bash">
$ git-push ssh://hades@montty.dreamhost.com/home/hades/example.com/path/software.git
</pre>
<p>如果你嫌反复输入这么长的操作命令的话</p>
<pre lang="bash">
$ git remote add git-software \
  ssh://hades@montty.dreamhost.com/home/hades/example.com/path/software.git
</pre>
<p>以后你只需要输入<code>git-push git-software</code>就行了</p>
<p>5.查看DH主机的repo</p>
<pre lang="bash">
$ git-clone http://example.com/path/software.git
</pre>
<p>确认下DH主机上的repo是否已成功导入本地repo的内容及更新。</p>
<p><strong>参考:</strong></p>
<ul>
<li><a href="http://autopragmatic.com/2008/01/26/hosting-a-git-repository-on-dreamhost/" title="Hosting a git repository on dreamhost">Hosting a git repository on dreamhost</a></li>
<li><a href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository" title="Git User's Manual : Setting up a public repository">Git User&#8217;s Manual : Setting up a public repository</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.punkid.org/2008/03/28/howto-setup-git-repo-on-dreamhost/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PP is Here</title>
		<link>http://blog.punkid.org/2007/02/19/pp-is-here/</link>
		<comments>http://blog.punkid.org/2007/02/19/pp-is-here/#comments</comments>
		<pubDate>Mon, 19 Feb 2007 06:28:29 +0000</pubDate>
		<dc:creator>iPUNKID</dc:creator>
				<category><![CDATA[Site Log]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[feedburner]]></category>
		<category><![CDATA[punk-projekt]]></category>

		<guid isPermaLink="false">http://blog.punkid.org/2007/02/19/pp-is-here/</guid>
		<description><![CDATA[For those guys still missing PP It&#8217;s HERE: http://pp.punkid.org ! I tried to set it up days ago, but the domain&#8217;s ip was inaccessible for those China Telecom (My Ass!) users in China. As i was busy in doing some other things, so i just put it down. Yesterday,I contacted the DH&#8216;s service,asking them to [...]]]></description>
			<content:encoded><![CDATA[<p>For those guys still missing <abbr title="PUNK PROJEKT">PP</abbr></p>
<p>It&#8217;s HERE: <a href="http://pp.punkid.org">http://pp.punkid.org</a> !</p>
<p>I tried to set it up days ago, but the domain&#8217;s ip was inaccessible for those China Telecom (My Ass!) users in China. As i was busy in doing some other things, so i just put it down. Yesterday,I contacted the <abbr title="Dream Hustle or Dreamhost ??">DH</abbr>&#8216;s service,asking them to change another available ip for me. And i&#8217;m quite appreciate their prompt reponse and enthusiastic help. Now PP is here !</p>
<p>I also get the PP&#8217;s feedburner back to its orignal owner: PP. That means, my personal blog&#8217;s feed service is no longer provided by <a href="http://feeds.feedburner.com/punkprojekt" title="PP feedburner address">http://feeds.feedburner.com/punkprojekt</a> but <a href="http://feeds.feedburner.com/punkid" title="my blog's feedburner address">http://feeds.feedburner.com/punkid</a></p>
<p>If you&#8217;d wish to subscribe my personal blog : ProjeKt D.K ,try this address:<br />
<a href="http://feeds.feedburner.com/punkid" title="my blog's feedburner address" style="margin-left:20px;">http://feeds.feedburner.com/punkid</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punkid.org/2007/02/19/pp-is-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

