0

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?

1
  • 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, 2011 at 20:57

2 Answers 2

1

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.

0
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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