I'd like to setup a mirrored development environment between my work computer and my computer at home somehow. We have SVN setup, so mirroring files isn't a big deal. I'm thinking more like virtual host configurations and database files. I could always setup replication, is that the best solution when working with local/remote?
2 Answers
i would recommend that you have a script that run the deployment automatically. it should pull data from a source that is accessible from both ends.
replication is a good option but what do you do if you make a mistake and is mirrored - you can do something else - enable binary logs at work then you mirror the logs home and insert them manually or via a script only when you are sure that the deployment is successful.
a good choice to keep all the configuration files is a version control system (svn has a web access from cli so it's easy but you may have already a system in place)
so the procedure will be:
- push to version control your config files
- adapt them to the environment (change ip addresses, dns names etc)
- push them to the server
- test
at this point one site is done all you have to do is redo it at home.

- 2,687
- 2
- 18
- 19
in addition the @silviud
if your machines can connect dropbox or similar service you can copy your config files, data files or other not svn'ed files there. Maybe your code base too.
Also, if your test server can connect dropbox too, you can deploy your application in dropbox folder too, with that way all the changes are automaticly push to all machines.
i use this setup in my Work Machine, Test VM, Home machine , Test VM in home machine (same as work test vm), this way i am not copiying all the vm files or svn repository all the time. all the changes comes through dropbox service.
By the way, Dropbox has revision history too, so you can easily return previos versions of file any time.

- 151
- 2