Skip to content

Migrating a site with CiviCRM to BOA

Arjan edited this page Apr 16, 2015 · 1 revision

You can basically follow Import your sites to Aegir in 8 easy steps, with some caveats:

  • When you create the new, blank site on your platform, make sure the platform has CiviCRM in it so it will be automatically installed, with sites/foo.com/civicrm.settings.php generated.
  • In BOA, CiviCRM uses the main Drupal database. If you previously used separate databases for Drupal and CiviCRM, you can just import your civi_ tables into the same database using drush sqlc < ~/static/path/to/your/civicrm-db-dump.sql
  • Before you import your CiviCRM tables, remove problematic security definers and the like from the database dump using the sqlmagic script: sqlmagic fix ~/static/path/to/your/civicrm-db-dump.sql
  • Furthermore, you should do a search-and-replace on the database dump to make sure it does not contain file paths which are not accessible on the target BOA system. Due to open_basedir restrictions, such paths could lead to php segmentation faults / 502 Bad Gateway / 504 Gateway Time-out problems, rendering the site unusable. Here is an example to change such paths:

First change the site-specific paths: sed -i 's/\/home\/username\/domains\/example\.com\/public_html\/sites\/default/\/data\/disk\/o1\/static\/platforms\/drupal-7\.36\.1-prod\/sites\/www\.example\.com/g' ~/static/path/to/your/civicrm-db-dump.sql

Then change any remaining non-site-specific paths: sed -i 's/\/home\/username\/domains\/example\.com\/public_html/\/data\/disk\/o1\/static\/platforms\/drupal-7\.34\.1-prod/g' ~/static/path/to/your/civicrm-db-dump.sql