2

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)

2 Answers 2

1

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.

2
  • 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, 2010 at 9:40
  • sorry you've lost me. If you mount the filesystem you get the files at write time
    – Jim B
    May 16, 2010 at 3:17
0

You could try scripting rsync (http://www.google.com/search?q=rsync+windows) 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.

2
  • Are you thinking a Cygwin daemon on the Windows box monitoring the directory (inotify?) triggering the rsync?
    – Dave Nolan
    May 15, 2010 at 9:43
  • 1
    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, 2010 at 18:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .