Mirroring website using seperate DB and domain?
I know you can use rsync to mirror a web site, but what if the two web sites are running on seperate domains and connecting to a different (though ultimately mirrored) database?
When I move features from the development version to the production, I would like to do so as seamlessly as possible. What should I be looking for?
7 Replies
The problem that I see with that is pushing the repo onto the live site would either require putting the site into maintenance while I ran in to update the configuration (and point it at the right domain/db), or … well that's about the only option.
Unless there's a way to build a git configuration that will grep my config files and do some replacements.
If the database schema changes significantly, though, that would have to be dumped/reloaded or something like that. You'll probably need a few minutes of downtime there. Likewise, no version control system AFAIK guarantees that your repository will be in a consistent state while you're in the middle of a merge, so if that's really important, you might also want to take down the site during the few seconds while you're merging.
I've only used SVN to manage code that I'm the sole committer for, so the whole concept of merging is foreign to me at this point. I've found some pretty good documentation for git… I just hope I can also find some time to read it!
Can't wait to see how bad I fudge up my site the first time I make a typo…
One thing I like about the setup I showed you over using regular sftp is that when you stfp it overwrites the file on the server which can take a second or two during that time someone can get a messed up file. Using git it pushes to a repository then copies the file into place on the server which is almost instant.