<?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>DaleR &#187; Subversion</title>
	<atom:link href="http://blog.dalereidy.co.uk/category/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dalereidy.co.uk</link>
	<description>Programming, mostly.</description>
	<lastBuildDate>Sat, 26 Jun 2010 17:04:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Backing up a Subversion repository to Amazon&#8217;s S3</title>
		<link>http://blog.dalereidy.co.uk/2009/12/11/backing-up-a-subversion-repository-to-amazons-s3/</link>
		<comments>http://blog.dalereidy.co.uk/2009/12/11/backing-up-a-subversion-repository-to-amazons-s3/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 19:51:18 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[s3cmd]]></category>

		<guid isPermaLink="false">http://blog.dalereidy.co.uk/?p=65</guid>
		<description><![CDATA[I&#8217;m currently working through the process of re-building my development server and have got to the stage of configuring the backup of my subversion repository to Amazon&#8217;s S3 storage &#8216;cloud&#8217;. Due to the inevitability of having to do it again in the near future I&#8217;m going to document how I keep my repository backed up, ]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working through the process of re-building my development server and have got to the stage of configuring the backup of my subversion repository to Amazon&#8217;s S3 storage &#8216;cloud&#8217;. Due to the inevitability of having to do it again in the near future I&#8217;m going to document how I keep my repository backed up, for myself, and for everyone else:</p>
<p>(This guide is assuming a freshly-squeezed Ubuntu 9.04 server install)</p>
<p>0. Obtain an <a href="http://aws.amazon.com/">AWS account</a> if you haven&#8217;t already &#8211; making note of the Access key and Secret key, you&#8217;ll need them in step 2.</p>
<p>1. Install <a href="http://s3tools.org/s3cmd/">s3cmd</a></p>
<pre>
root@trogdor:~# <strong>sudo apt-get install s3cmd</strong>
</pre>
<p>2. Configure s3cmd and follow the onscreen instructions</p>
<pre>
root@trogdor:~# <strong>s3cmd --configure</strong>
</pre>
<p>3. Create the backup location</p>
<pre>
root@trogdor:~# <strong>mkdir /var/nightly_backup</strong>
</pre>
<p>4. Create the backup script (/var/nightly_backup/backup.sh)</p>
<pre>
#!/bin/bash
svnadmin dump --quiet /var/svn/repos | gzip > /var/nightly_backup/svn.gz
s3cmd sync /var/nightly_backup s3://backup_bucket/nightly_backup/
</pre>
<p>5. Make the backup script executable</p>
<pre>
root@trogdor:~# <strong>chmod +x /var/nightly_backup</strong>
</pre>
<p>6. Amend /etc&nbsp;/crontab to run the backup at a suitable time (3am in this case)</p>
<pre>
... contents of /etc&nbsp;/crontab ...
0 3 * * * root /var/nightly_backup/backup.sh
</pre>
<p>7. Wait until 3am, or run /var/nightly_backup/backup.sh.</p>
<p>8. Download an S3 browser such as <a href="http://s3browser.com/">S3 Browser (Windows)</a> or <a href="https://jets3t.dev.java.net/">Jets3t (Java)</a></p>
<p>9. Configure your S3 browser of choice to point to your AWS account to confim that the backup completed successfully.</p>
<p>10. ?</p>
<p>11. Profit.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dalereidy.co.uk/2009/12/11/backing-up-a-subversion-repository-to-amazons-s3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
