Archive

Archive for the ‘web sites’ Category

A Backup Solution for a Linux-Based Web Site

August 3rd, 2009

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 , ,

Why I Chose Zen-Cart Over Magento (and Drupal)

July 21st, 2009

I recently spent about a week evaluating shopping-cart platforms for the new KidPub Press online bookstore. My requirements were actually fairly simple; I wanted something that:

  • Is easy to administer
  • Can be made to look like a bookstore
  • Has PHP as the underlying code
  • Integrates with Linkpoint as a payment gateway

The three prime contenders were Drupal (already in use at kidpub.com), Magento, and Zen-Cart.

I ruled out Drupal pretty quickly. even though I’ve used it for several years for the main KidPub site, I see it as a CMS platform, and what I really wanted was an e-commerce platform. Drupal can certainly be made to look and act like a bookstore, and it does have a Linkpoint module (though it is ‘beta’ code), but at the end of the day Drupal is about managing content, not transactions.

Next up was Magento. I’d read rabid reviews of the thing written by people who are just in love with the platform. I tried for about a day and a half to get Magento running correctly on my staging server without much luck. Wrong PHP version. Wrong SSL library. Database problems. I’m no slouch, having been knee-deep in Linux and Unix for about twenty years now, and I couldn’t get Magento to run in a way that gave me any sort of confidence. Letting it manage credit card transactions was out of the question, and it turns out that Magento and Linkpoint don’t play well together. Authorize.net? Out-of-the-box. Linkpoint? Good luck.

Zen-Cart was actually my second choice. Magento LOOKS fabulous, and I wanted that look for the store. Zen-Cart looks, well, a bit homemade, and there’s an expectation that you will roll up your sleeves and dig into the code if you want anything other than default behavior. To be fair, I’ve seen some outstanding sites powered by Zen-Cart, but I honestly don’t have the talent at hand to do such design work.

What sold me on Zen-Cart was that after literally two days of wrestling with Magento (and not getting ANYTHING to work), it took about ten minutes to get Zen-Cart up and running. Another few hours of tweaking and adding product, and I had a complete e-commerce site with full payment gateway integration AND that looks and acts like a bookstore. There’s a ‘book’ product module available, and I paid for a template look-and-feel that I thought was nice.

I’m pretty comfortable tweaking the PHP code in Zen-Cart, and I’ve done a moderate amount of customization. My impression of the Zen-Cart community is that there isn’t a lot of deep coding expertise, at least among the majority of users. There’s a lot of ‘find this line and change this value’ advice in the forums. That’s fine, Zen-Cart is a simple system and if I need to tweak a table or edit PHP to change some text, I don’t mind.

If what you need is just shopping-cart functionality without a lot of bells-and-whistles, consider Zen-Cart. Magento, in my opinion, just isn’t ready for commercial deployment. And Drupal? It’s still a pretty good CMS system.

You can see our Zen-Cart implementation at the KidPub Press bookstore.

perryd Uncategorized, tools, web sites

Meta Description and SEO: Your Big Marketing Voice

January 7th, 2009

I seem to be stuck on marketing with Google search results. With good reason, though…if your web site is like most, the majority of your traffic comes from Google.

In a previous post I discusses the importance of the title tag and how Google uses it in its display of search results. Heat maps show that most of the time spent looking at the search results page is on the upper-left part of the page, which tends to be the top three to five results.

The title tag, if you have one, is used for the link to your web site. Directly below is about 25 words of text that can come from the page being indexed, or from the meta description tag, if it exists.

If the title tag becomes your billboard, the description becomes your call to action. This is your 25-word chance to give readers (who spend just a second or two looking at the result) a compelling reason to visit your web site. Use action words here, and give the reader a reason to click. For KidPub we use the words ‘visit’, ‘play’, and ‘read’, and ‘write’ as well as ’safe’ and ‘fun’ since our target is not only children but their parents.

The description goes into the meta description= tag. Take advantage of essentially free marketing by paying attention to how Google sees your pages, especially the title and meta description tags!

perryd google, marketing, seo, web sites