Archive for the ‘Sysadmin’ Category

yum update error

Posted by Sam Monday, June 1st, 2009

Updating my CentOS box failed with a TypeError: unsubscriptable object.  (I spent far too long reading that as “unscriptable object”).  Google to the rescue — following Rowan Crane’s helpful advice led me to 

# yum clean metadata; yum update

And all was well.  Thanks!

When backslashes attack (or: rsync sucks)

Posted by Sam Friday, June 20th, 2008

We use BackupPC for our backups, both on our site and at $CLIENT. It’s a great onsite backup tool, really brilliantly done, and I recommend it to anyone who has small office multi-PC backup needs.

BackupPC can connect to clients in a variety of ways, the most useful being rsync and SMB (windows networking). All our machines are on rsync and most of $CLIENT’s are on SMB, just because it was easier to use the networking that was already set up than to install rsync on 20 machines.

Recently we switched a key computer to rsync because it had been having problems with SMB. I got most of the files being backed up but there was a problem with the Documents and Settings directory, which is, um, important. So I hacked on the config files for a while and couldn’t get it to work. I eventually split all but the Documents and Settings directory into its own host so at least that stuff (accounting databases) would be being backed up.

It turns out that the problem was one character in the host’s rsyncd.conf file. This may be fixed with new versions of rsync, but just for your information you will get a ‘chdir error’ if there’s a trailing backslash in your path, like this:

[docs]
path = C:\Documents and Settings\

but everything works fine if the backslash is gone, like this:

[docs]
path = C:\Documents and Settings