Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I need to synchronize the project folder on my local machine with the same folder on the server so that when I change the local or the remote file they are immediately synchronized. How can I do this?

share|improve this question
    
Which OS is installed on the server and local machine? Also what kind of latency would be acceptable. How much data and how many files changes are you expecting? –  ollybee May 30 '11 at 20:57

2 Answers 2

up vote 1 down vote accepted

Source version control software (CVS, SVN, git, etc) is typically exactly what you want in this type of situation.

They do not provide immediate synchronization, but I suspect that you want to re-think why you need that. There will likely be trouble if your production server is updated every time you change a file on your desktop. What if you hit save half-way through some changes?

If you don't want to mess with keeping a history of changes, use a utility like rsync to keep the two systems synchronized periodically.

If you're positive that you must have immediate synchronization, then there is likely no need to have a copy on both systems. Just mount the directory from the server on your desktop (via sshfs, mapped network drive, etc) and make the changes directly to the files.

share|improve this answer
    
Great answer, thanks a lot. :) –  Kevin Grace Jun 10 '11 at 20:12

Personally, I'd go with what i_grok suggested by using SVN, P4 or Git. Reason being, is that what happens when you make a bad change to your code and now you've sent your site down the tubes. However you can do as i_grok also suggested with a mapped network drive or sshfs or you can write a custom python script within your working directory to auto-upload.

You can use the watchdog python library. and actually someone appears to have done some of the work for you, so you could just go here and plug it in.

share|improve this answer

Your Answer

 
discard

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.