tags:

views:

158

answers:

6

Hey guys,

Can you recommend a good SSH file sync utility for Windows? For example, I have some C++ sources that I need to compile remotely. I need this utility to be simple and most of all responsive, so I can compile my sources instantly after saving, without having to wait for the sync to be triggered.

+1  A: 

Use rsync. See this. There is even an instruction to set automatic backup.

NawaMan
From what I can see, rsync cannot automatically detect when file is changed and upload it?
Dario
Ummm. Sorry it's my bad. I misread this part of your question 'WITHOUT having to wait for the sync to be triggered.'. I have no experience about file monitoring in Windows so I really cannot help (sorry again). However, a quick search lead me to FileSystemWatcher (http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx) with a tutorial here (http://www.c-sharpcorner.com/UploadFile/mokhtarb2005/FSWatcherMB12052005063103AM/FSWatcherMB.aspx). You may give it a try.
NawaMan
+1 FileSystemWatcher works quite well and is quite reliable. I've already used it for some little tools. Sure, you would need to develop an application using any .NET-language like C# or similar.
Atmocreations
+3  A: 

for source-code, you could use something like git or subversion, paired with an ssh-connection using port-forwarding.

in all cases you would need to trigger the sync yourself except you have a tool that watches the directory you're working on.

regards

Atmocreations
can you add post commit hook to scp your files?
discovlad
hmmm how do you mean that? sure you can add hooks (http://wordaligned.org/articles/a-subversion-pre-commit-hook) but why should you want to scp your files after having committed? sorry, I don't see the point.
Atmocreations
A: 

Sounds like a job for a Continuous Integration tool.

kenny
A: 

install cygwin and use rsync over ssh.

discovlad
A: 

It seems to me that one way to solve your problem would be to simply use a network drive. Edit your files from the network drive, and whenever you save, any other systems connected to that drive can also access your changes, including your build server. That's what we do at my office — everyone's home directories are on NFS/CIFS shares, so we edit on our local computers, but run a script to trigger a build on any of several build servers, even multiple platforms at once. We don't have to sync anything before being allowed to compile our latest changes.

Rob Kennedy
+1  A: 

try this, SSHSync for windows

http://code.google.com/p/sshsync/

A command line applications that allows intelligent Secure FTP transmissions. SshSync only support pull type transfers, but it allows use of a Private Key to ensure that authentication is secure. A text file that contains a list of files always processed is used to check that only 'new' files are retrieved.

muffytyrone
I came across this old thread while looking for exactly this. It's working flawlessly with public key authentication and does exactly what I want.
Fanis