Hi, I'm Paul

I'm a software geek, photographer, yogi and dog lover

smbclient timeout fix

1 minutes
December 19, 2008

Sometimes, I just really hate Windows. Don’t get me wrong, I use a Windows laptop all day long for work and then come home and run Windows for Photoshop etc. in the evenings. It’s just that some things in the Windows environment are plain broken, take virus scanning for example - when an application attempts to read from a file, the on-demand virus scanner must block access to the file until virus scanning has been completed. This works fine for 1K text files, but really slows things down with today’s gigabyte videos, VM filesystem images, etc.

Normally, this is just plain annoying, but when it comes to running backups with BackupPC, the delay is just fatal. The problem relates to how BackupPC uses smbclient to backup Windows. Now smbclient has a hard coded timeout of 20 seconds for access to shares, with no ability to override this timeout from the command line. Hence, backups were consistently failing with “Call timed out: server did not respond after 20000 milliseconds opening remote file”.

Since I’m using Fedora 8 for my backup server, I’ve created updated samba 3.0.33 packages (samba, samba-client, samba-common, samba-debuginfo, samba-doc, samba-swat, libsmbclient, libsmbclient-devel) with the relevant patch, source and spec.