Bag of Spoons
Just off the A1(M)

Tue, 14 Feb 2006

Backing up my Computer

Backing up your computer data is a waste of time, until something goes wrong. I've been pretty lucky so far and managed not to lose anything really important. I've never had a hard disk suddenly die. Backing up is one of those things that I keep thinking I should do. I have burnt data to CDs in the past. To be even safer I keep them somewhere other than at home, so even if there was a fire I would not lose it.

What I really wanted was a way to create a safe, off-site backup that would keep track of my latest files. I have access to a remote Linux server that has plenty of disk space so that looked like a good place to put it. I tried various tools:

Konserve is a friendly little program, but I found it too limiting in specifying which files I wanted to back up. I want to be able to exclude certain files and directories within the structure I was backing up.

Sbackup looked more promising. It's GUI lets you select files to include and exclude. by location and size. The problem was that I just couldn't get it to connect to my remote server. This has to use an encrypted connection, which is what I would want anyway.

The real geek choice is rsync. It's a pure command line tool that can do incremental backups to anywhere you like. I just didn't get as far as reading all the necessary documentation.

Then I read this article about rdiff-backup. It sounded like a friendlier version of rsync. It's even written in Python, but I'm not sure I'll be hacking it just yet. It requires the program to be available at both ends of the connection, so I had to get it installed on the server. Then I found that the version available to Ubuntu was too old. It was very easy to install the up to date one.

Running it is pretty simple. You specify the source and destination and away you go. Either end can be remote, so you can also use it to back up a web site. It automatically uses ssh, so communication is as secure as you are likely to need. I worked out how to use public keys to remove the need for passwords. To exclude files I just create a text file with a list in it.

So far I have backed up several gigabytes. Actually this was more than I intened as I accidentally included some big directories. This can take a very long time as my NTL broadband is a lot slower to upload than it is to download (256kb vs 2Mb). I think the longest one took 41 hours! As it is incremental it should be much quicker in future as only changed files will be sent. When I want to restore anything it's just a matter of copying it back as everything is stored in it's original form.

My next step is to automate the process so that I don't even have to think about it. That requires a little planning.

[20:27] | [/Computer] | Comments | G
blog comments powered by Disqus

About

Categories

Calendar
< February 2006 >
SuMoTuWeThFrSa
    1 2 3 4
5 6 7 8 91011
12131415161718
19202122232425
262728    

Blogging
Subscribe if you like
XFN Friendly

Adverts
Linux.org
Get Firefox!
Flying Spaghetti Monster

Hosted at VeloceSystems