I’m starting work on a site that is already in EE (currently running EE 1.5.2). I’d like to set up a development subdomain to work on the updated version of the site (dev.site.com).
I don’t want to work with the existing database at all because I need to update the site to 1.6.4 and add a lot of extensions and modules, alter the weblogs with new fields, etc, in short - a LOT of changes - and I don’t want to interrupt the client’s current usage of the site. Plus, the client is big enough that there is some level of bureaucracy involved, so I can’t just go nuts on the live site (like I’d really like to do…)
My initial thought was to, at a certain date known to everyone involved, completely dupe the existing site into the dev subdomain, and dupe the DB as well. At that point, I can do whatever I need to without worrying about messing with the original site or original DB.
The problem with that method is that the client adds 1-5 articles a day, and they receive comments on articles as well. At the day/time I duplicate the DB to the time we launch, every article and comment that is added will have to be duplicated to the development database, which is an extra pain. Development of the updated site will take about 2 months, so we’ll have two months of manual duplication involved. Instead of doing this manually, it would be superb if, maybe once a day, anything that was added to the main production DB was cloned over to the dev DB that I’ll be working on.
As Brandon Kelly states in this post regarding his company’s build of Navigant Consulting:
...we’ve got one shell script that dupes the DB (except for a couple tables), doing a URL search & replace in the process, and another one that runs rsync on several of the directories. It’s worked great so far.
Has anyone else done something similar? Anyone got a shell script they’d like to share so I can see what tables were ignored, and how the URL search replace works?
The issue I see is that I’ll be altering the structure of the development database and a perfect clone from a production 1.5.2 DB to a dev 1.6.4 DB won’t work. I could update their live site to 1.6.4 so the tables structures are more or less the same, but I think some modules that I have to install (like Solspace Tag) add columns to existing EE tables.
I’m looking for any advice or experience here, as I’m not totally sold on the duplication method I’m contemplating. I have yet to fully start the development, and don’t want to jump in unless I’m confident in my decision on how to proceed. Am I making this more difficult than I need to?
Thanks for any input!
EDIT/ADD: Here are some related posts.
1. database sync troubles
A post from Nov 2007 that outlines syncing troubles with EE pretty well, that was never answered.
2. set up development environment in a subdomain
Describing how a dev/production site running different versions can share the same database, but different tables.
That raises an interesting question: if the dev/production sites were using the same DB, but diff tables (with a diff prefix), couldn’t an extension be written that submits to BOTH sets of tables when a comment or new entry is made? Has anyone done anything like that?