Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Machine A, Windows Server 2003. Machine B, Ubuntu 9.04.

Aim is to copy new and updated files only automatically as fast as possible from A to B. B can mount A either as CIFS or NFS (Services for Unix NFS server running on A). This is an absolutely time critical operation.

What is the best way of achieving this? Can inotify work over CIFS or NFS?

Note: benchmarked NFS vs CIFS and CIFS was faster and there was less variance in the speed (haven't tuned the NFS setup at all)

share|improve this question

If you are really stuck using a linux box as the destination then run services for unix on the 2003 box and export the filesystem to the ubuntu box (NFS). If you need to copy the files to another filesystem there you will have to write a script to move them. Quickest possible would be to simply mount the windows filesystem at the proper location on the ubuntu system and not copy them at all.

I've found that the windows NFS support is more stable then the linux cifs support.

share|improve this answer
Thanks but I'm only interested in processing new and updated files, so how can I monitor the Win FS over the network from the Linux box? – Dave Nolan May 15 '10 at 9:40
sorry you've lost me. If you mount the filesystem you get the files at write time – Jim B May 16 '10 at 3:17

You could try scripting rsync ( to run in some kind of "pushbutton" way: As soon as you edit or create a file on the Windows machine, push the button, and away it goes.

You could also create a script (batch or Powershell) that sleeps for some period of time in between rsync runs.

I suggest rsync, because my understanding is that the protocol is more efficient (data / protocol overhead) than either CIFS or NFS.

share|improve this answer
Are you thinking a Cygwin daemon on the Windows box monitoring the directory (inotify?) triggering the rsync? – Dave Nolan May 15 '10 at 9:43
As a recall, cron jobs that run every second cause problems. I suspect that the equivalent functionality on windows would have a similar problem. I was thinking a cludgy script with a while loop and a sleep statement (or windows equivalant). Unless you followed @JimB's advice and just used mounted directories, you'll have to fire off the sync somehow, regardless of what underlying file transfer technology you are using. I was mostly pointing out that rsync is more efficient, for multiple reasons, than RPC protocols. – pcapademic May 15 '10 at 18:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.