Søren Vind

For the sake of everybody in the band

Backing up to Amazon S3 (Part 2) – duplicity

As I wrote in my post last week, I have been playing a bit with how to back up to Amazon S3 on Ubuntu. The simplest method of doing so is to use Duplicity, which have built-in support for backing up to a S3 bucket. That means that the only thing you have to do is to write a backup-script and set it to run whenever you feel like it.

Setting up the backup, I took a lot of inspiration from a blog post at cenolan.com and a blog post by Tim McCormack. Actually, “a lot of inspiration” may be an understatement, as I simply followed their lead. Read their posts for a thorough how-to. A single missing piece of information from both of their posts is that your S3 bucket may be placed in Amazon’s european datacenter, in which case you need to apply the following options to duplicity when running it:
--s3-european-buckets --s3-use-new-style

Besides adding these options, I did little to modify the work of cenolan.com. All credit for the modified backup.sh and backdown.sh goes to him.

Another way to back up to Amazon S3 is to mount it as a FUSE file system, and encrypt the data while rsync’ing it to the file system. That is how I want to set up backup for my laptop, for example. It eases restore and selection of exactly what files to backup (and backdown). How to set up that solution is going to be the subject of another blog post.

peecee.dk solgt til Tweak Media

I slutningen af marts besluttede jeg endelig, at jeg simpelthen ikke havde tid til at drive min uploadservice peecee.dk mere. Det fik mig til at skrive i en besked på sitet at det blev lukket for nye uploads per 1. april og helt lukket derefter. Det viste sig dog hurtigt, at der var interesserede købere af sitet, som i flere år har været danmarks største uploadservice, og det er endt med at Tweak Media (ejer af tweak.dk og sjovonline.dk) har købt sitet.

Overdragelsen og salget er nu fuldstændig gennemført, jeg er stolt af at Tweak Media vil videreføre driften af sitet og ser frem sitets videre udvikling under de nye ejere.

I øvrigt ser det ud til at mange troede at det var en aprilsnar da jeg annoncerede at sitet lukkede:
http://c4d.dk/kn-skype-til-iphone-peecee-lukker
http://www.gaming.dk/forum/topic/15202
http://www.hardwareonline.dk/traad.aspx?tid=485371&fid=30
http://macbay.dk/key/agNyYnlyDAsSBFBvc3QY16IDDA
http://www.proinvestor.dk/index.php?p=debat&postid=6823
http://www.airsoftzone.dk/forum/viewtopic.php?f=14&p=433071
http://www.airsoftzone.dk/forum/viewtopic.php?f=14&t=33820
http://www.tweakup.dk/readmore/12922/PeeCee.dk_lukker/
http://www.tweak.dk/nyheder2.php?id=19714&title=Peecee.dk_lukker

Til alle brugere: Tak for hjælpen!

Backing up to Amazon S3 (Part 1)

Backing up your files can obviously be done in many ways. Some prefer a USB-disk located somewhere to which backups can be made with irregular intervals, while others prefer the backups to be made by some automated process which backs up to some remote location. It is probably apparent from the last sentence that I prefer to back up to some remote location – preferably completely automatic.

Moving my online-presence to another server, I now have a lot less space to store my backups on than I had before. Thus, a simple rsync-via-ssh is not really an option any more. This forced me to look for another solution. Luckily, there is a great abundance of online backup services, most of which use Amazon S3 as the backend storage. I seemed to have two options to use S3 as the backup provider:

  1. Use some commercial and complete software for making, transferring and organizing the backups. A couple of solutions seemed mature enough to real-world usage: Dropbox and Jungle Disk. Several user reports recommend both solutions, which should be quite stable and easy to use. Also, they are not that expensive compared to the raw cost of S3. Both commersial solutions have disadvantages, though – Dropbox adds a lot of cost if you want to store more than 2GB but a lot less than 50GB (compared to S3), and Jungle Disk apparantly stores the backed up files in some odd way, making it hard to recover files without Jungle Disk. Also, they share the disadvantage of being commercial (it is non-free and the source code is not available). An advantage of both solutions is that they are multiplatform.
  2. Use some combination of open source software to back up my files directly to Amazon S3. The open source software available for communicating more or less directly with S3 seems quite mature at this time. Browsing the blogosphere gave me a lot of documentation on how to do this using varying tools ranging from duplicity through two (different) projects called s3fs and s3fs (??) to encFS. Using these tools, it is possible to customize the backup of files in exactly the way the user wants, and they do not present the user with any extra cost besides the raw cost for the S3 storage.

I chose the second option, using a bit more time in setting up the backup but in return getting a completely customized and free backup toolchain. In the next couple of posts I will document how I did it, but to get an idea (and to get some inspiration), here is the resources I used when setting up the backup:

http://blog.eberly.org/2008/10/27/how-i-automated-my-backups-to-amazon-s3-using-rsync/
http://www.cenolan.com/2008/12/how-to-incremental-daily-backups-amazon-s3-duplicity/
http://www.brainonfire.net/blog/remote-encrypted-backup-duplicity-amazon-s3/
http://sharph.net/2008/12/encrypted-offsite-backup-with-encfs-amazon-s3-and-s3cmd/
http://markusthielmann.com/blog/use_amazon_s3_with_ubuntu_hardy
http://www.sharms.org/blog/?p=137

Ubuntu Jaunty on the Lenovo x200

I decided to install Ubuntu Jaunty Alpha 6, and have been using it since then. There does not seem to be any issues with it when used with the Lenovo x200 (the issues I have had have all been related to the fact that I chose amd64 as the platform – that creates some minor issues with browser plugins and such).

As the new Ubuntu uses a new Intel driver, using the DisplayPort interface in the docking station works flawlessly. Also, plugging in a Huawei 169 3G modem worked out of the box (it may have already done so in Ubuntu Intrepid Ibex, I did not test it). During installation, I chose to have my home drive automatically encrypted, and this has not created any issues either. All in all, (almost) everything is supported and working out of the box with the x200.

The only thing which does not seem to work with the x200 (of the features I have tested) is the middle mouse button, which just does not have scrolling enabled. But as I got it working in Intrepid Ibex, it should not be hard to do the same in Jaunty.

pc_user updated

I have just uploaded a new version of the user authentication library, pc_user. It does not contain major changes – only a security improvement which could have resulted in a SQL injection attack if the parameters given to the library was not cleaned prior to passing it to the library. The new release fixes this issue.

The new release, 1.1.