<?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>A Blog by Tim Bishop &#187; tarsnap</title>
	<atom:link href="http://www.bishnet.net/tim/blog/tag/tarsnap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bishnet.net/tim/blog</link>
	<description>"For a moment, nothing happened. Then, after a second or so, nothing continued to happen." -- HHGTTG</description>
	<lastBuildDate>Wed, 02 Nov 2011 15:21:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Automating tarsnap backups</title>
		<link>http://www.bishnet.net/tim/blog/2009/01/28/automating-tarsnap-backups/</link>
		<comments>http://www.bishnet.net/tim/blog/2009/01/28/automating-tarsnap-backups/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 19:18:07 +0000</pubDate>
		<dc:creator>Tim Bishop</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[tarsnap]]></category>

		<guid isPermaLink="false">http://www.bishnet.net/tim/blog/?p=149</guid>
		<description><![CDATA[How to create a backup schedule for tarsnap, and how to test it without using up your allowance.


Related posts:<ol><li><a href='http://www.bishnet.net/tim/blog/2009/01/28/machine-backups-using-tarsnap/' rel='bookmark' title='Permanent Link: Machine backups using tarsnap'>Machine backups using tarsnap</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2011/09/23/maildirarc-a-maildir-archiving-tool/' rel='bookmark' title='Permanent Link: Maildirarc &#8211; a Maildir archiving tool'>Maildirarc &#8211; a Maildir archiving tool</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/10/freebsd-filesystem-snapshots/' rel='bookmark' title='Permanent Link: FreeBSD filesystem snapshots'>FreeBSD filesystem snapshots</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.bishnet.net/tim/blog/2009/01/28/machine-backups-using-tarsnap/">last post</a> I wrote about backing up my dedicated server and why I decided to use <a href="http://www.tarsnap.com/">tarsnap</a>. After a couple of months of running tarsnap manually I decided it was way past the time to properly automate it.</p>
<p>The main issue is how many snapshots do you want to store? On the one hand it&#8217;s nice to be able to go back in time as far as possible, but on the other hand there&#8217;s the issue of how large your archives get (and consequently the cost).</p>
<p>There are three different charges for tarsnap; data sent, data received and data stored. Each is charged on a daily basis and subtracted from a total in your account (you keep an account in credit rather than being billed). If you&#8217;re doing backups on a daily basis the data sent and received will be approximately the same regardless of how long you retain the archives for. So the figure to consider is the cost for storing the data.</p>
<p>I decided to go for a model where I had X daily backups, Y weekly backups and Z monthly backups. I also decided I wanted to back up only certain directories, and that I wanted to keep them as separate archives (because I&#8217;m dealing with large numbers of files, and this breaks it down a bit &#8211; I don&#8217;t think it affects costs).</p>
<p>So I went about scripting this. First step was to write a &#8220;fake&#8221; tarsnap. The reasoning behind this was that it&#8217;d allow me to do quick backup runs without any time used for archiving or any costs. It&#8217;s basically just a perl script that adds and removes archives from a database file.</p>
<p>Next I wrote a backup script. It&#8217;s pretty basic at the moment, but fully automates the creation of archives and deletion of expired ones. You provide it with a list of directories to back up, and how many daily, weekly and monthly archives you want to keep. Then stick it in cron and off it goes.</p>
<p>It&#8217;s a bit tailored to my setup, and may only work on FreeBSD (are the date flags the same on other operating systems?). Also, its cleaning of old archives is primitive; it&#8217;s based on the number of archives, rather than the age.</p>
<ul>
<li><a href="http://www.bishnet.net/tim/tarsnap/run.sh">Tarsnap backup script</a></li>
<li><a href="http://www.bishnet.net/tim/tarsnap/tarsnap.pl">&#8220;Fake&#8221; tarsnap for testing backups</a></li>
</ul>
<p>I welcome feedback on these scripts and improvements, but bear in mind they&#8217;re very much a work in progress.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.bishnet.net/tim/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.bishnet.net/tim/blog/2009/01/28/machine-backups-using-tarsnap/' rel='bookmark' title='Permanent Link: Machine backups using tarsnap'>Machine backups using tarsnap</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2011/09/23/maildirarc-a-maildir-archiving-tool/' rel='bookmark' title='Permanent Link: Maildirarc &#8211; a Maildir archiving tool'>Maildirarc &#8211; a Maildir archiving tool</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/10/freebsd-filesystem-snapshots/' rel='bookmark' title='Permanent Link: FreeBSD filesystem snapshots'>FreeBSD filesystem snapshots</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.bishnet.net/tim/blog/2009/01/28/automating-tarsnap-backups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Machine backups using tarsnap</title>
		<link>http://www.bishnet.net/tim/blog/2009/01/28/machine-backups-using-tarsnap/</link>
		<comments>http://www.bishnet.net/tim/blog/2009/01/28/machine-backups-using-tarsnap/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 16:34:54 +0000</pubDate>
		<dc:creator>Tim Bishop</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[tarsnap]]></category>

		<guid isPermaLink="false">http://www.bishnet.net/tim/blog/?p=144</guid>
		<description><![CDATA[A look at backup options for my server and why I decided to go with tarsnap.


Related posts:<ol><li><a href='http://www.bishnet.net/tim/blog/2009/01/28/automating-tarsnap-backups/' rel='bookmark' title='Permanent Link: Automating tarsnap backups'>Automating tarsnap backups</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/05/a-new-router-soekris-draytek-and-nanobsd/' rel='bookmark' title='Permanent Link: A new router (Soekris, Draytek and NanoBSD)'>A new router (Soekris, Draytek and NanoBSD)</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/10/freebsd-filesystem-snapshots/' rel='bookmark' title='Permanent Link: FreeBSD filesystem snapshots'>FreeBSD filesystem snapshots</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a dedicated server that I&#8217;ve been backing up for the past few years. My crude backup system involved taring everything to local disk and then rsyncing it to a remote server. It worked well at first, but as the amount of data grew it was taking half a day to run. Add to that the amount of disk space being used by the local copy and I had to find a better solution.</p>
<p>I started off by looking at replacements for rsyncing to my remote server. <a href="http://rdiff-backup.nongnu.org/">rdiff-backup</a> seemed an obvious choice, but some friends had previously had problems with it, so I decided to give it a miss. There were various other similar tools that involved copying my data to another server (of mine), possibly with incremental features, but I decided to expand my search criteria and came across online backup services.</p>
<p>These services involve paying someone else to store your data remotely. In principal there didn&#8217;t seem to be much point; I had somewhere else to put my data, so why pay for it? One solution that seemed quite nice was <a href="http://search.cpan.org/~bradfitz/Brackup/lib/Brackup/Manual/Overview.pod">brackup</a> &#8211; a set of perl scripts that backed up to <a href="http://aws.amazon.com/s3/">Amazon S3</a>. Still not quite what I wanted though.</p>
<p>Then, I remembered a project <a href="http://www.daemonology.net/">Colin Percival</a> was working on &#8211; <a href="http://www.tarsnap.com/">tarsnap</a>. It&#8217;d be a while since I last checked up on progress so I was quite pleased to see that he&#8217;d just launched the <a href="http://www.daemonology.net/blog/2008-11-10-tarsnap-public-beta.html">public beta</a>. I signed up and handed over some money. What made me decide on this solution over others? Well,</p>
<p>1. It works pretty much like tar, except the archives are remotely stored. So that made it simple to use and fit it to my way of working.</p>
<p>2. It has all the benefits of snapshots with all the benefits of incremental backups. By this I mean that you can access each archive as if it was a full copy, but behind the scenes it only transmits and stores the differences (and charges you accordingly). You can delete any archive in the set without worrying about things like needing all the incrementals to the last full backup, and it sorts it all out for you.</p>
<p>3. Colin is a FreeBSD guy, so that pretty much guarantees it&#8217;s going to work well on FreeBSD and be supported in the future.</p>
<p>4. After doing the sums I realised the charges are pretty insignificant compared with the cost of running my own dedicated server.</p>
<p>5. There&#8217;s a whole load of stuff about security. It doesn&#8217;t particularly interest me though, but it&#8217;s nice to know my data is safe (nobody can read it &#8211; Colin included &#8211; without my key).</p>
<p>So I&#8217;ve been using tarsnap now for a few months and on the whole I&#8217;ve been very happy. There was a minor issue with the large number of files (Maildir email storage can get insane <img src='http://www.bishnet.net/tim/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ) I had to backup, but once I discovered the <code>--lowmem</code> flag all was fine. And Colin&#8217;s support has been great &#8211; he&#8217;s always been quick to answer if I&#8217;ve had a question or problem.</p>
<p>If you&#8217;re looking for an online backup service that&#8217;s geared towards Unix systems I highly recommend giving tarsnap a try.</p>
<p>(How about reading my post on <a href="http://www.bishnet.net/tim/blog/2009/01/28/automating-tarsnap-backups/">Automating Tarsnap Backups</a>?)</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.bishnet.net/tim/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.bishnet.net/tim/blog/2009/01/28/automating-tarsnap-backups/' rel='bookmark' title='Permanent Link: Automating tarsnap backups'>Automating tarsnap backups</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/05/a-new-router-soekris-draytek-and-nanobsd/' rel='bookmark' title='Permanent Link: A new router (Soekris, Draytek and NanoBSD)'>A new router (Soekris, Draytek and NanoBSD)</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/10/freebsd-filesystem-snapshots/' rel='bookmark' title='Permanent Link: FreeBSD filesystem snapshots'>FreeBSD filesystem snapshots</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.bishnet.net/tim/blog/2009/01/28/machine-backups-using-tarsnap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

