Skip to content

When backslashes attack (or: rsync sucks)

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:

path = C:\Documents and Settings\

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

path = C:\Documents and Settings