<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Kristian Rumberg</title>
	<atom:link href="http://kristianrumberg.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kristianrumberg.wordpress.com</link>
	<description>adventures in the land of software development</description>
	<lastBuildDate>Sun, 17 Mar 2013 19:01:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kristianrumberg.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Kristian Rumberg</title>
		<link>http://kristianrumberg.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kristianrumberg.wordpress.com/osd.xml" title="Kristian Rumberg" />
	<atom:link rel='hub' href='http://kristianrumberg.wordpress.com/?pushpress=hub'/>
		<item>
		<title>I have a dream</title>
		<link>http://kristianrumberg.wordpress.com/2012/07/21/i-have-a-dream/</link>
		<comments>http://kristianrumberg.wordpress.com/2012/07/21/i-have-a-dream/#comments</comments>
		<pubDate>Sat, 21 Jul 2012 22:28:40 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[a-*]]></category>
		<category><![CDATA[a-star]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[dijkstra]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[path finding]]></category>
		<category><![CDATA[rts]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=375</guid>
		<description><![CDATA[My dream is to one day write my very own RTS-game Just kidding, only serious. Well, at least now I have completed one step in the process by writing an a-star path finding library https://github.com/krumberg/astar<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=375&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>My dream is to one day write my very own RTS-game <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Just kidding, only serious. Well, at least now I have completed one step in the process by writing an a-star path finding library <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="https://github.com/krumberg/astar">https://github.com/krumberg/astar</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/375/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=375&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2012/07/21/i-have-a-dream/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
		<item>
		<title>Podcastfs now works on OS X</title>
		<link>http://kristianrumberg.wordpress.com/2012/04/14/podcastfs-now-works-on-os-x/</link>
		<comments>http://kristianrumberg.wordpress.com/2012/04/14/podcastfs-now-works-on-os-x/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 20:24:44 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=356</guid>
		<description><![CDATA[I spent some hours this morning hunting down a few bugs that caused podcastfs not to work under OS X (MacPorts). I also verified that it still compiles and runs fine under Debian testing. https://github.com/krumberg/podcastfs<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=356&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I spent some hours this morning hunting down a few bugs that caused podcastfs not to work under OS X (MacPorts). I also verified that it still compiles and runs fine under Debian testing.</p>
<p><a href="https://github.com/krumberg/podcastfs">https://github.com/krumberg/podcastfs</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/356/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=356&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2012/04/14/podcastfs-now-works-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
		<item>
		<title>RObject</title>
		<link>http://kristianrumberg.wordpress.com/2012/01/06/robject/</link>
		<comments>http://kristianrumberg.wordpress.com/2012/01/06/robject/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 11:38:03 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ansi]]></category>
		<category><![CDATA[ansi-c]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[object oriented programming]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=343</guid>
		<description><![CDATA[RObject is a library I wrote a while ago that adds single inheritance object oriented programming support to ANSI C. It&#8217;s very small and can be customized and extended if so needed. Features that are not implemented but could easily &#8230; <a href="http://kristianrumberg.wordpress.com/2012/01/06/robject/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=343&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>RObject is a library I wrote a while ago that adds single inheritance object oriented programming support to ANSI C. It&#8217;s very small and can be customized and extended if so needed. Features that are not implemented but could easily be added include</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Reference_counting">Reference counting</a></li>
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html#toString%28%29">&#8220;toString&#8221;</a> Java-like method in base type RObject</li>
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html#hashCode%28%29">&#8220;hashCode&#8221; </a>Java-like method in base type RObject</li>
<li><a href="http://en.wikipedia.org/wiki/Property_%28programming%29">Properties</a></li>
</ul>
<p><a href="https://github.com/krumberg/robject">https://github.com/krumberg/robject<br />
</a><br />
Note that you need my Google Test-like unit testing library <a href="https://github.com/krumberg/rtest">&#8220;rtest&#8221;</a> to build the code.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/343/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=343&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2012/01/06/robject/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
		<item>
		<title>git: the stupid NOSQL database</title>
		<link>http://kristianrumberg.wordpress.com/2011/08/23/git-the-stupid-nosql-database/</link>
		<comments>http://kristianrumberg.wordpress.com/2011/08/23/git-the-stupid-nosql-database/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 18:49:03 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=329</guid>
		<description><![CDATA[There are so many ways to use git. Manage your source code, handle large directories of files with git-annex, run a decentralized wiki or blog. View this talk and get inspired The speaker is the author of Gollum, the wiki &#8230; <a href="http://kristianrumberg.wordpress.com/2011/08/23/git-the-stupid-nosql-database/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=329&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There are so many ways to use <a href="http://git-scm.com/">git</a>. Manage your source code, handle large directories of files with <a href="http://git-annex.branchable.com/">git-annex</a>, run a decentralized wiki or blog. <a href="http://confreaks.net/videos/443-rubyconf2010-git-the-stupid-nosql-database">View this talk</a> and get inspired</p>
<p>The speaker is the author of <a href="https://github.com/github/gollum">Gollum</a>, the wiki system used by <a href="https://github.com/">Github</a>. I tried it yesterday and it&#8217;s really easy to setup and seems to work very well.</p>
<p>To get gollum running, open a terminal and execute</p>
<p><code>gem install gollum<br />
git init<br />
gollum<br />
</code></p>
<p>This will install gollum, create a new git repository (preferably in a new and empty folder but I wanted to keep the example short) and starts a wiki webserver on port 4567 that is reading/writing to this repository.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/329/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=329&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2011/08/23/git-the-stupid-nosql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
		<item>
		<title>Some git workflows</title>
		<link>http://kristianrumberg.wordpress.com/2011/08/20/some-git-workflows/</link>
		<comments>http://kristianrumberg.wordpress.com/2011/08/20/some-git-workflows/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 09:21:55 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[rebase]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=315</guid>
		<description><![CDATA[In this post I will describe some of the git workflows I use. Stay tuned for more of these. Please comment and tell me if I do something really stupid and also please add suggestions on how I can optimize &#8230; <a href="http://kristianrumberg.wordpress.com/2011/08/20/some-git-workflows/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=315&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In this post I will describe some of the git workflows I use. Stay tuned for more of these. Please comment and tell me if I do something really stupid and also please add suggestions on how I can optimize these tasks.</p>
<p><strong>Fork a branch, do some development and merge it back to master.<br />
</strong><br />
Assume you have written some code that should be developed further in another branch, or assume you are going are to begin writing such code.</p>
<p>Fork the current branch<br />
<code>git checkout -b mynewfeature<br />
</code><br />
Do some hacking &#8211; commit, commit commit. You should know how this works.</p>
<p>Now you want to merge it back to master.<br />
<code>git checkout master<br />
git pull --rebase . mynewfeature</code></p>
<p>‘git merge mynewfeature’ should be enough but you may have done some work in your local master and forgot to push it. In such case we get a merge which is a quite ugly compared to a rebase since we then get a nonlinear history.</p>
<p>Now your local master has your new code and it&#8217;s safe to delete mynewfeature<br />
<code>git branch -d mynewfeature</code></p>
<p>Rebase from the server and  push the code to the server.<br />
<code>git pull --rebase </code>    # You may have to add ‘origin master’ here if your tracking config is missing<br />
<code>git push</code></p>
<p><strong>Split a large commit into smaller commits before pushing<br />
</strong><br />
Assume that you have made a large commit that you<br />
must split before you push it to the server.</p>
<p>Undo the commit<br />
<code>git reset --soft HEAD^1</code></p>
<p>Now all of your commit are in the index. Move them back to the unstaged area.<br />
<code>git reset</code></p>
<p>(1)</p>
<p>Now issue a git status and check what your commit contains<br />
<code>git status</code></p>
<p>Start adding parts using the -p flag. Answer ‘y’ or ‘n’ depending on whether the chunk should be added or not<br />
<code>git add -p # You may add a folder or file path here</code> </p>
<p>Look at what&#8217;s in the index<br />
<code>git diff --cached # I have an alias 'git dc' for this<br />
</code><br />
Once happy with your index, make a commit of it<br />
<code>git commit -m “A tiny feature”</code></p>
<p>Go back to (1) until there is nothing more to add. Then merge the branch back to master according to the previous workflow description.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/315/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=315&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2011/08/20/some-git-workflows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
		<item>
		<title>On the importance of backups and distributed version control</title>
		<link>http://kristianrumberg.wordpress.com/2011/07/15/on-the-importance-of-distributed-version-control/</link>
		<comments>http://kristianrumberg.wordpress.com/2011/07/15/on-the-importance-of-distributed-version-control/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 13:54:43 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=298</guid>
		<description><![CDATA[I care a lot about my data (and so should you). Because of this I keep all of my code and all my documents under version control using git. Media files are not modified very often which makes version control &#8230; <a href="http://kristianrumberg.wordpress.com/2011/07/15/on-the-importance-of-distributed-version-control/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=298&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I care a lot about my data (and so should you). Because of this I keep all of my code and all my documents under version control using <a href="http://git-scm.com/">git</a>. Media files are not modified very often which makes version control less important.</p>
<p>Still losing all your music or your video collection is a horrible experience but here comes <a href="http://git-annex.branchable.com/">git-annex</a> to the rescue. It allows you to manage your files from a single location, you can add new files, remove files, rename or move files and then propagate these changes to multiple disks or servers.</p>
<p>Many people don&#8217;t do backups at all. Some do but not regularly. Some do them regularly but they never try to restore their data. Just assuming that your backup system works in the reverse direction is naive and dangerous, but it&#8217;s all too common. If you use a distributed version control system the problem goes away. Every client then has a full backup of all your data. In the case of git-annex this is not necessarily the case but it allows you to configure a policy that forces you to store file X in at least Y different repositories.</p>
<p>Finally I use Time Machine too as it allows me to very quickly get back on track if I need to reinstall my complete system. For the moment Time Machine is also responsible for my photos and my music. If you don&#8217;t use a Mac then checkout <a href="http://rsnapshot.org/">rsnapshot</a> or <a href="http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp">DeltaCopy</a>. If you find these systems hard to use you can store your data in the cloud using <a href="http://www.dropbox.com/">Dropbox</a> (2 GB free) or <a href="http://www.box.net/home">Box.net</a>. Use the right tool for the right job!</p>
<p>If you lose all your family photos there is no one else who can help you get those memories back. Start doing backups!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=298&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2011/07/15/on-the-importance-of-distributed-version-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
		<item>
		<title>Emulate Time Machine using rsync</title>
		<link>http://kristianrumberg.wordpress.com/2011/07/13/emulate-time-machine-using-rsync/</link>
		<comments>http://kristianrumberg.wordpress.com/2011/07/13/emulate-time-machine-using-rsync/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 04:12:03 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[emuate]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[time machine]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=276</guid>
		<description><![CDATA[Many people using a Mac love Time Machine. It&#8217;s a simple and (often enough) powerful tool for performing incremental backups with file history. It relies on hard links. For people using GNU/Linux or for Mac users who desire a bit &#8230; <a href="http://kristianrumberg.wordpress.com/2011/07/13/emulate-time-machine-using-rsync/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=276&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Many people using a Mac love <a href="http://en.wikipedia.org/wiki/Time_Machine_%28Mac_OS%29">Time Machine</a>. It&#8217;s a simple and (often enough) powerful tool for performing incremental backups with file history. It relies on <a href="http://en.wikipedia.org/wiki/Hard_link">hard links</a>.</p>
<p>For people using GNU/Linux or for Mac users who desire a bit more control it&#8217;s possible to simulate almost all of Time Machines features (except for the nice GUI) using <a href="http://en.wikipedia.org/wiki/Rsync">rsync</a>. I have written such a script and I might just as well share it. Please give feedback if you have any suggestions for how to improve it. As usually you have to tweak it to match your folder structure. Please note that I do not take any legal responsibility regarding how it&#8217;s used or what it may do to your data. I just believe it works! </p>
<p>If you use Microsoft Windows then checkout <a href="http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp">DeltaCopy</a> which is a popular front end to rsync.</p>
<p><em>Update:<br />
The script below is a quick and simple hack but it seems to work just fine. A more complete and mature solution for *NIX that is also based on rsync and hard links is <a href="http://rsnapshot.org/">rsnapshot</a>.</em></p>
<pre>
#!/bin/bash

dirs2back=(~/Music ~/Documents)
destdirs=(/Volumes/media)

function back {
BDIR=$1

if [ -d $BDIR ]
then
	foofile="$BDIR/foofile"
	if touch "$foofile"
	then
		echo $BDIR is writable

		if ln $foofile ${foofile}_lnk
		then
			rm ${foofile}_lnk
			rm "$foofile"
		else
			echo "Error: Sorry this filesystem does not support hard linking"
			rm "$foofile"
			exit
		fi

		RDIR=$BDIR/rsyncmachine
			
		TODAY=`date | awk '{print $4 "_" $3 "_" $5}' | sed s/://g` 
		TODAY=$RDIR/$TODAY
		echo $TODAY
	
		LASTTXT=$RDIR/last.txt

		if [ -d $RDIR ]; then
			echo "Running incremential backup"

			if [ -e $LASTTXT ]; then
				echo "Performing incremential backup"
				YESTERDAY=`cat $LASTTXT`
				echo $YESTERDAY

				if [ -d $YESTERDAY ]; then
					for item in ${dirs2back[*]}
					do
						rsync --progress -av --include=".*" --link-dest $YESTERDAY $item "$TODAY"
					done

					echo $TODAY &gt; $LASTTXT
				else
					echo "Error: $YESTERDAY is not a directory"
					exit
				fi
			else
				echo "Error: No last backup, please update last.txt manually!"
			fi
		else
			echo "First time running rsyncmachine"
			echo $TODAY

			mkdir -p $TODAY

			for item in ${dirs2back[*]}
			do
				rsync --progress -av --include=".*" $item "$TODAY"
			done

			echo $TODAY &gt; $LASTTXT
		fi

	else
		echo "$2 is not writable, not syncing"
	fi

else
	echo "Error: $BDIR is not connected"
fi
}

for item in ${destdirs[*]}
do
	back $item
done
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/276/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=276&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2011/07/13/emulate-time-machine-using-rsync/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
		<item>
		<title>How I use git-annex</title>
		<link>http://kristianrumberg.wordpress.com/2011/07/13/how-i-use-git-annex/</link>
		<comments>http://kristianrumberg.wordpress.com/2011/07/13/how-i-use-git-annex/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 03:42:02 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[annex]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=263</guid>
		<description><![CDATA[I use git-annex  for managing my movie collection and application installers. I often add new content from my laptop and I want to propagate it to my servers and then drop it locally. Doing this manually is tedious so I &#8230; <a href="http://kristianrumberg.wordpress.com/2011/07/13/how-i-use-git-annex/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=263&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I use<a href="http://kristianrumberg.wordpress.com/2011/07/06/git-annex/"> git-annex</a>  for managing my movie collection and application installers. I often add new content from my laptop and I want to propagate it to my servers and then drop it locally. Doing this manually is tedious so I wrote a very simple bash script that does it for me. Maybe some of you would like to do something similar so I might just as well publish it here. It should be obvious that you have to tweak it to match your directory and server structure.</p>
<p>You may notice that I run &#8220;git add scripts&#8221; instead of &#8220;git annex add scripts&#8221; since this folder contain small files that I want to keep under version control.</p>
<p>Disclaimer: It&#8217;s not written in the most efficient way possible but works well for me. However please give comments if you think I&#8217;m doing something really silly.</p>
<p>Updated: New version with improved but not perfect error handling</p>
<p><code><br />
#!/bin/sh</p>
<p>stores=(media elements media2 docsnmedia)</p>
<p>laptop=~/AnnexMedia</p>
<p>cd $laptop<br />
git annex add Video<br />
git annex add Computing<br />
git add scripts<br />
git commit -m "added new content"</p>
<p># Pull from servers in case I added something there also<br />
for item in ${stores[*]}<br />
do<br />
	if [ -d /Volumes/$item/Media ]<br />
	then<br />
		echo "$item is connected"<br />
		cd $laptop<br />
		git fetch $item<br />
		git pull $item master<br />
	fi<br />
done</p>
<p># Pull the new (merged) tree from laptop and fetch all content to each server<br />
for item in ${stores[*]}<br />
do<br />
	if [ -d /Volumes/$item/Media ]<br />
	then<br />
		cd /Volumes/${item}/Media<br />
		echo "Fetching to $item"<br />
		git fetch laptop<br />
		git pull laptop master<br />
		git annex get<br />
		git commit -m "m"</p>
<p>		cd $laptop<br />
		git pull $item<br />
		git pull $item master<br />
	fi<br />
done</p>
<p># Drop all movies on laptop<br />
cd $laptop<br />
git annex drop Video<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/263/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=263&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2011/07/13/how-i-use-git-annex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
		<item>
		<title>podcastfs &#8211; mounting a podcast using fuse</title>
		<link>http://kristianrumberg.wordpress.com/2011/07/11/podcastfs-mounting-a-podcast-using-fuse/</link>
		<comments>http://kristianrumberg.wordpress.com/2011/07/11/podcastfs-mounting-a-podcast-using-fuse/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 20:16:40 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[emms]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[glib]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[podcast]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=247</guid>
		<description><![CDATA[This is one of my old projects that I still find cool and quite useful. It&#8217; s a fuse filesystem for mounting a list of podcast feeds and allows any &#8220;stupid&#8221; music player to browse and play the content as &#8230; <a href="http://kristianrumberg.wordpress.com/2011/07/11/podcastfs-mounting-a-podcast-using-fuse/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=247&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This is one of my old projects that I still find cool and quite useful. It&#8217; s a fuse filesystem for mounting a list of <a href="http://en.wikipedia.org/wiki/Podcast">podcast</a> feeds and allows any &#8220;stupid&#8221; music player to browse and play the content as mp3 files.</p>
<p>I wrote at a time when I was using <a href="http://www.gnu.org/software/emacs/">GNU Emacs </a>to a larger degree than what should be regarded as healthy. Emacs can be used for almost everything including audio playback. <a href="http://www.gnu.org/s/emms/">Emms</a> is a music player within the editor and it can handle playlists and browse directories but no does not support podcasts. <a href="http://repo.or.cz/w/podcastfs.git">podcastfs</a> closes this gap.</p>
<p>I have not touched the code for two years and these days I use Google Reader for reading blogs and podcast listening.</p>
<p>Podcastfs works well but is lacking some important features. It does not support refreshing a podcast and it&#8217;s not possible to add or remove a podcasts on the fly. You have to umount and mount the whole filesystem to perform any such action.</p>
<p>Nevertheless the code should still work and is very open for any hacker with too much spare time. It&#8217;s written in GNU C using <a href="http://developer.gnome.org/glib/">GLib</a> and it&#8217;s licensed under the <a href="http://sv.wikipedia.org/wiki/MIT_License">MIT license</a>. Please fork it and send me a pull request if you do <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="//repo.or.cz/podcastfs.git">git://repo.or.cz/podcastfs.git</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/247/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=247&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2011/07/11/podcastfs-mounting-a-podcast-using-fuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
		<item>
		<title>git-annex</title>
		<link>http://kristianrumberg.wordpress.com/2011/07/06/git-annex/</link>
		<comments>http://kristianrumberg.wordpress.com/2011/07/06/git-annex/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 11:06:05 +0000</pubDate>
		<dc:creator>kristianr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[annex]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-annex]]></category>
		<category><![CDATA[hess]]></category>
		<category><![CDATA[joey]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://kristianrumberg.wordpress.com/?p=231</guid>
		<description><![CDATA[git-annex is a tool for managing large files using git. Unlike how git is commonly used this system does not actually version the files themselves, instead it handles symbolic links to the files. git-annex provide a few very nice features &#8230; <a href="http://kristianrumberg.wordpress.com/2011/07/06/git-annex/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=231&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a title="git-annex" href="http://git-annex.branchable.com/" target="_blank">git-annex</a> is a tool for managing large files using git. Unlike how <a title="git" href="http://git-scm.com/" target="_blank">git</a> is commonly used this system does not actually version the files themselves, instead it handles symbolic links to the files.</p>
<p>git-annex provide a few very nice features including</p>
<ul>
<li>The ability to handle trees of large files. &#8220;Normal git&#8221; is not an alternative is this case.</li>
<li>Automatic data retrieval. Any client can see the whole repository of files (as symbolic links) although it does not necessarily have access to any of them.  The user can run a command such as &#8220;git annex get movie.avi&#8221; and git-annex will download this file from any remote that has it.</li>
<li>Safe data dropping. Any client may &#8220;drop&#8221; a file at any time. This means that it&#8217;s removed from the local data storage but this will only be allowed if git-annex can verify that it exists at some remote. It&#8217;s possible to configure this policy. For example you may decide that some very important files must always be stored in at least three places.</li>
<li>Rename tracking. If you rename or move a file this change will be tracked by git and affect other repositories when you choose to perform a push or pull. One very cool thing is that you can rename and move around files you don&#8217;t even have available from your local machine. Again this is possible since git-annex only tracks symbolic links in addition to tracking which files are available where. Before I found git-annex I used <a title="rsync" href="http://en.wikipedia.org/wiki/Rsync" target="_blank">rsync</a> but it&#8217;s not clever when it comes to renaming. However rsync is used &#8220;under the hood&#8221; when files are transferred between git-annex repositories.</li>
</ul>
<p>So this sound great. But what is the catch?</p>
<ul>
<li>To make sure that no data is lost by accident all files are kept read only and you must unlock and lock files to modify them. This is very uncommon when it comes to movies or executable files but is often needed when handling music files and images.</li>
<li>Git-annex gets quite slow if you add TOO many files. I&#8217;m talking about a couple of hundred thousand files. I don&#8217;t have that many movies or music files but iTunes and iPhoto love to create billions of billions of tiny files so don&#8217;t store their folders in git-annex! Trust me I have tried <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Some programs don&#8217;t like symbolic links, they want to access real files. Unfortunately this includes my <a title="Boxee media player" href="http://www.dlink.com/boxee/" target="_blank">Boxee media player. </a>This may require you to lock and unlock your whole library quite often which is a waste of time.</li>
</ul>
<p>I use git-annex to handle my movie collection and executable files such as application or operating system installers.</p>
<p>The git-annex project is developed by <a title="Joey Hess" href="http://kitenet.net/~joey/">Joey Hess</a> and it&#8217;s very active. Joey makes updates almost every day and if you find a bug and report it on his <a title="webpage" href="http://git-annex.branchable.com" target="_blank">webpage</a> he will solve it within a day or two. This guy is marvelous!</p>
<p>Currently git-annex does not have a GUI. One has to type commands in a terminal and this makes it less usable for normal users. I think this may change as git-annex continues to mature and gain popularity. We all, including average people need a good distributed system for managing our large collection of files and I believe that git-annex is up for at least a part of the task.</p>
<p>If you want to try git-annex and use Linux or Mac OS X then go to</p>
<p><a title="http://git-annex.branchable.com/" href="http://git-annex.branchable.com/" target="_blank">http://git-annex.branchable.com/</a></p>
<p><strong>Update:</strong><br />
I have &#8220;solved&#8221; my Boxee issue by running rsync between a git annex repository and the filesystem on my boxee like this</p>
<p><code>rsync --size-only -vaL --progress --delete $GIT_ANNEX_REPO $BOXEE_FS_PATH</code></p>
<p>Instead of copying the symbolic links it copies the data referred to by these while still naming the files according to the symbolic links. Works great apart from when I do massive renames or move folders around using git-annex. Then all these files and directories have to be transferred again.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristianrumberg.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristianrumberg.wordpress.com/231/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristianrumberg.wordpress.com&#038;blog=6596432&#038;post=231&#038;subd=kristianrumberg&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristianrumberg.wordpress.com/2011/07/06/git-annex/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/bb8d029db59da98a0c5e0053b1edc459?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kristianr</media:title>
		</media:content>
	</item>
	</channel>
</rss>
