[BUGS] rsync + smbfs

Jerahmy Pocott quakenet1 at optusnet.com.au
Wed Jan 2 07:54:49 EST 2008


Sorry to spam the mailing list yet again today >.<

But I'm wanting to run a backup from cron, the problem is that I can't  
mount the smbfs shares from fstab, it works fine from fstab if the  
shares are on the local subnet, but it fails when they are on a  
different subnet (which mine are) due to netbios name lookup failing.  
 From the command line I can specify -I x.x.x.x to supersede netbios,  
however you can't seem to do this from fstab.. I tried creating  
a .nsmbrc for root that had the IP address set for the server, but to  
no avail. Also putting the IP address as the server name in fstab  
fails for some reason!

Any way, what I want to do is create a script that will run from cron  
that 1) checks the smbfs is mounted and mounts it if needed, 2)  
performs the rsync and mails me a log. However I'm not sure how to  
achieve step 1 without fstab, as simply calling the mount command will  
actually mount the same share on top of any existing mounted share and  
I don't really want the share mounted multiple times!

Any thoughts on how I can achieve this would be muchly appreciated as  
I'm a bit stuck..


More information about the BUGS mailing list