About a month ago I started evaluating backup solutions for the web sites I host on my remote servers. I’ve had a little Netgear NSLU2 (Slug) doing the job…the Slug is a tiny Linux server…it’s about the size of a deck of cards…that come with two USB ports and an ethernet connection. Although the NSLU2 is preinstalled with a Linux distribution, I reflashed it with Debian. The little Slug has been doing nightly backups via rsync for three or four years now, storing them on an external drive. Once a week I burn a snapshot to DVD.
Why replace something that works? I’m beginning to worry that the NsLU2 might give up the ghost. I suppose it’s just paranoia, after all the thing has an uptime of 342 days today, and seems to be working fine. I think it was the launch of the new KidPub Press bookstore that made me rethink the backup strategy.
The difficulty I had finding a solution is that the servers are running a Red Hat variant of Linux (CentOS), and I wanted to to backups to a local Windows 7 box, mainly for ease of use. Even though the Slug does a great job, it’s incredibly slow…it takes a couple of hours to build a1G ISO image for burning to DVD, for example. My requirements were pretty simple. I need to do a one-way daily mirror of several directories and the MySQL databases.
I evaluated seven solutions:
- SiteShelter
- HandyBackup
- Backup4All
- Site Vault
- Unison
- DeltaCopy
- cwRsync
The first four are commercial products ranging in price from $200 to $40. The last three are open source.
Of the commercial solutions, only SiteShelter was able to properly mirror the remote server. The issue is that most of the backup programs rely on an Attribute flag on a file to determine if a file has been archived, however the flag doesn’t exist in the Linux filesystem. The symptom of this is that an incremental backup will download everything, even ify ou’ve just done one, because the software doesn’t have any way to tell if it has already downloaded a file.
SiteShelter is able to correctly manage incremental backups from the Linux box. Its interface leaves a lot to be desired, though. In its defense, the program is supposed to be run as a service, but I don’t think that’s an excuse for having an awkward human UI. Of the three commercial solutions it is the most expensive, at $200 for a single license. Although I thought SiteShelter was promising, I really didn’t see any advantage in using it versus using rsync, which is free.
The trouble, of course, is that there is no native rsync for Windows. I started looking for rsync ports. Most of them rely on Cygwin, and excellent Unix emulator for Windows that’s been around for as long as I can remember. Installing Cygwin just to get rsync seemed like overkill, ven for a Linux guy like me. Instead, I found three packages hat bundle just enough Cygwin with rsync to provide a backup solution for Windows.
Unison is the most complicated, and I rejected it for its complexity. It just does way more than I need, and just configuring it for a quick test took an hour.
DeltaCopy works but suffers from a very poor user interface. I didn’t have a lot of confidence in it because of this.
I settled on cwRsync. Although it has a UI based on GTK, I didn’t use it. It is identical to rsync on the Linux side, so I simply copied over my rsync script from the NSLU2. I had to change the destination directory, but that was the only configuration required, and the exclusion file I’ve added to over the years didn’t need to be changed at all. Ten minutes setting up the batch file to run in Windows Scheduler and I was done with my backup solution. It’s fast, secure (uses SSH), and just works, which is my #1 criteria for any product.
One other bit of information…a few of the commercial products try to back up MySQL databases by logging on to them directly. I didn’t get a lot of good feelings about these, and they seemed terribly slow. Because I ended up using rsync, I stuck with my old database backup strategy, which is a cron job that runs on the server that uses mysqldump to create snapshots of all of the critical databases. These files are dropped into a directory that rsync monitors for its daily run.
I now have a solid backup system to a Windows machine that is fast, easy to use (the remote directory structure is duplicated locally), and provides a quick burn to DVD. That it is free and a familiar and trusted solution is icing.
perryd optimization, tools, web sites backup, linux, rsync