Categories
Linux OS/Software

Backuppc woe

I’ve been using BackupPC to take offsite backups of all my machines over the network for over a year. It seemed to work well enough and, it seemed, would always email me if it hadn’t been able to backup a certain machine for a few days.

Yesterday I discovered that it has not done a successful backup of one of my machines since March! I just suddenly noticed on the status screen that instead of a table of 8 backups (2 full and 6 incr), only 3 were shown — 2 full, both dating back to March, and 1 “partial” from the day before yesterday. Looking at the logs I see this:


2006-07-24 06:00:05 full backup started for directory /data/work; updating partial 678
2006-07-24 06:20:28 full backup started for directory /home; updating partial 678
2006-07-24 06:20:34 Got fatal error during xfer (fileListReceive failed)
2006-07-24 06:20:39 Backup aborted (fileListReceive failed)
2006-07-24 06:20:39 Saved partial dump 678

Exactly the same thing has been happening every day for the past 4 months. Backuppc didn’t email to tell me. It’s email system was definitely working because during that time it did mail me about a machine that was offline for a while. So it appears it doesn’t bother to send mail to notify you of a failed backup!

I had no idea what might be causing this. It just started out of the blue, having worked flawlessly before March. It only affected one machine. The configuration had not changed. It always failed on /home but was apparently ok with /data/work.

Something weird in /home? To find out, I set tar loose on it:

$ cd /home; tar cf - . >/dev/null
tar: ./jammin/.gxine/socket: socket ignored
tar: ./jammin/.kde/kdeinit-\:0: socket ignored
tar: ./sarah/.totem.sarah: socket ignored
tar: ./sarah/.xine/session.0: socket ignored
$

Surely not. Surely it couldn’t be something as trivial as a couple of stale socket files causing my backup to fail? Well, I’m not using any of those programs, so I deleted the sockets, and told backuppc to start a full backup. What do you know — it worked.

So is it that it doesn’t like sockets? Or has the poor thing got confused by the funny characters in the filename of that KDE one? I’ll test this out at a later date when my backups have recovered.

There are three major failings by BackupPC here. One, failing over a simple socket or dodgy filename, and not giving much clue why. The second, not bothering to email when a backup fails halfway through. But most concerning of all is that it kept trying to add to the same partial backup, instead of starting a new one — so I no longer have 2 weeks’ worth of incrementals even for the part of the backup that succeeded. Every day, yesterday’s backup was being overwritten by today’s. If I needed to recover a version of a file in /data/work from 2 days ago, I couldn’t. That sucks.

This has made me realise something. Quis custodiet ipsos custodes?. Why am I relying on *one* backup solution? It’s a SPOF, and it has quite spectacularly F’d. I still want to find out why, and ideally fix it, but I’m also going to start setting up something else alongside. Since backuppc is server-driven, the alternative should be client-driven. All recommendations welcome. The two major requirements are that it must support ssh, and be bandwidth-efficient because I’m backing up over ADSL.
All the client machines run Linux.

Categories
Usability Web

URL aesthetics

Look at the state of this… the URL itself I mean, not the page it points to:
http://www.tbs-sct.gc.ca/rma/eppi-ibdrp/hrs-ceh/6/RMA-CGR_e.asp

Can you imagine trying to dictate this to someone over the phone, or read it out on the radio? Reckon you can memorise it? If you saw it in your history list would you remember what the page was about?

URLs should be:

  • designed for people, not computers and not filesystems;
  • as short as possible (maintaining hierarchy only as necessary);
  • as meaningful as possible — using words, dates, standard reference numbers, or whatever will make sense to your users, not a bunch of abbreviations;
  • single case, not a mixture of lower and upper case;
  • persistent (cool URIs don’t change), and therefore designed with persistence in mind. A URL is more likely to persist if it is sensible and economical in the first place!

URLs should not:

  • include implementation details (.asp) and language preferences (_e), both of which can be handled transparently by content negotiation;
  • use unnecessary punctuation. Some punctuation is ok, but four dashes scattered throughout the URL is too many.

Ideally, it should also always be possible to remove the trailing part of a path to obtain an index document for that level. If that’s not the case (which it isn’t for this one), it’s a probable sign that you have more levels of hierarchy than you actually need.

Categories
Accessibility AJAX Rails Ruby Web

AJAX v Accessibility on Rails: Fallbacks

I’ve tentatively placed a toe aboard the AJAX bandwagon, thanks largely to Rails which makes it possible, even painless, to achieve AJAX functionality without having to learn Javascript.1

While AJAX, done properly, can be a big win for Usability for those whose browsers support it, I am also concerned with issues of Accessibility, and indeed keeping things usable for those with non-AJAX browsers.

Standards-Schmandards have come up with some useful hints about how to make AJAX pages more accessible to screenreaders, such as providing an option to pop up an alert box instead of, or as well as, simply updating the page. This is good advice, but it’s only half the story. These methods don’t help those without Javascript at all, or with non-AJAX-aware browsers.

In this article I will detail one method to help ensure accessibility for such people, without compromising on AJAX spiffiness, and most importantly without causing much extra work for us poor developers. The example is in Rails, but may be of interest to those using other frameworks.

Categories
Perl

Parsing CSV files with embedded newlines in Perl

Need to parse CSV (comma-separated values) files which contain embedded newlines in the fields, as produced by many applications including MS Excel? The usual Perl modules Text::CSV, Text::CSV_XS and CSV.pm can’t do it. Fortunately there is one that can, called Text::xSV. Find it on CPAN. I’m posting about it here to raise awareness because Google searches threw up lots of people asking about this but the answer was not obvious.

Categories
Hardware Product Reviews

Review: Body Glove Scuba Cellsuit for K750i

A good mobile phone deserves a good case — ideally one that it never has to be removed from, so that it’s always protected from dirt and droppage. So I invested in a Body Glove “Scuba Cellsuit” for my K750i (got it on eBay). Here follows a review with some pictures.

For me the important things about a case are, in order:

  1. Doesn’t impede usage of the phone while in the case.
  2. Provides some protection if dropped.
  3. Doesn’t make the phone twice as big.
  4. Provides extra grip, making droppage less likely.

You’ll notice the absence of any requirement for it to look good. In fact, I’m quite happy for a case to look rubbish if it fulfills all the above criteria. Not least because it makes it look less worth stealing.

The Body Glove however manages to succeed at all the above and looks alright too. Not as good as the phone looks without it, obviously, but that’s fine by me.

Categories
Hardware Linux Technology

Sony Ericsson K750i and Linux

I just had a very strange experience. I hooked up my new Sony Ericsson K750i mobile phone via USB to my PC (running Linux 2.6.11 Debian unstable). And it just worked. I didn’t have to faff around with the USB driver as I’d had to for my Treo 600 a year ago. It just thought for a while, dumped several KB of its thoughts into syslog (I probably selected a debugging option when I built the kernel), and *ping* the memory stick in the phone appeared as /dev/sda. I just had to mount /dev/sda1 (vfat), and there it was.

Almost disappointing.

The phone is very nice, btw. Screen is good, mp3 playback is very good (even with the supplied earbuds — even through the speaker is not bad), camera is alright (for a phone). Organiser is rubbish: you can’t set up events without a time, or recurring events like birthdays, and the bold font used to identify dates with appointments in calendar view is barely different from the normal font. Sometimes I think I should just go back to a paper diary…