CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Best practices for doing development & production in parallel?
Pages: [1]

Author Topic: Best practices for doing development & production in parallel?  (Read 1141 times)

kdas

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 0
Best practices for doing development & production in parallel?
March 08, 2009, 11:50:06 am
Hi All,

I would like to know what are the best practices if you want to have a development and production database separate, also development and production code environment separate, how to migrate changes from development to production.

a. The changes in metadata like custom groups/fields, tags, list of values, security (ACL, Roles etc), Groups (of contacts or ACL) etc. - These changes are store in the database but are not the actual contact data. How to port these changes from development database to production database? Do we need to do it manually?

b. The changes in custom template and custom php - I don't think there is any choice other than to manually compare and re-apply the code changes. May be a simple source contol system help. Any one has recommendation?

Please let me know if there are other ideas.

As always, thanks a lot for all your support on the forum.

Regards,
-KDas

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Best practices for doing development & production in parallel?
March 08, 2009, 02:09:00 pm
 
part b is a easier question. I would use svn (or git) and use the merge/diff facilities there to manage and maintain your code base

for part a, a couple of options.

1. You can do a myslqldump of all the meta data tables and then load them into production. You should use the CiviCRM ERD on the wiki to figure out what tables. Contact us on IRC if interested

2. A more scalable way might be to write a PHP based import/export script that does the above and use xml as the intermediate format. We've gone down that path a bit, check: http://svn.civicrm.org/civicrm/branches/v2.2/bin/migrate/ for some ideas on the scripts.

Please do contribute your changes back to the community. If you need help with 2 above, contact us on IRC

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Best practices for doing development & production in parallel?
March 09, 2009, 02:59:47 am
For the code, that's indeed the easiest part.

Beside git/svn, I use rsync -avzC to put in production (it only copies the modified files).

Keeping the db in sync between the dev and the prod is indeed the tricky bit. I have some devs to import for instance tags, but still a complex issue, especially because in production you will also have new stuff (eg group, tag, relationship types...), that might, or might not, be the identical to the ones in dev.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Best practices for doing development & production in parallel?

This forum was archived on 2017-11-26.