I’ve never really faced the problem of differences between development and production versions before. The reason is development version always was stored on my local PC and production one was stored on the server. Or I always tried to kept it in my mind (the differences between versions) and sometimes I felt really crazy about that. I had to go and copy files over and remember which ones I copied an which not. I never had a time to try rsync and now I know for sure it was a mistake. I figured out about the ability of symfony to synchronize versions and it helped me to breath out 🙂
So it can be used in the different ways, e.g. you may synchronize development version and production. But there can be another implementation – you may have the same codebase which you are improving from time to time and you want these changes to be quickly deployed on another hosts where is installed the same codebase. So in other words you may want to have an ability to quickly upgrade your software. And lets focus exactly on this case.
So first of all you’ll have to go to config/properties.ini and modify it by adding a list of hosts where your codebase (which must be upgraded) is installed, e.g.
[name1]
host=hostname1.com
port=22
user=username1
dir=/home/username1[name2]
host=hostname2.com
port=22
user=username2
dir=/home/username2
That’s it. Now you have to run the following commands from the place where is installed your main codebase (e.g. improved one):
symfony sync name1 go
symfony sync name2 go
and it will ask you about host access password and it will copy your current codebase to name1 and name2 locations.
You have to read symfony manual to figure out the details but I hope this small writing helps you to start using sync.