0

I'm trying to install Drupal and CiviCRM in a local development environment and I keep running into this issue:

[Exception] CiviCRM appears to have already been installed. Skipping full installation.

If I remove the civicrm database and civicrm.settings.php I can install Drupal and CiviCRM.

This is my current script:

mv web/sites/default/civicrm.settings.php web/sites/default/civicrm.settings.php.bkp
mysql -uroot -proot -hdb -e "DROP DATABASE IF EXISTS civicrm; CREATE DATABASE civicrm; GRANT ALL ON civicrm.* TO 'db'@'%';"
drush site:install minimal --existing-config --account-name=admin --account-pass=password --yes
drush pmu gvote_sync
mv web/sites/default/civicrm.settings.php.bkp web/sites/default/civicrm.settings.php

I understand requiring a clean database, but it seems like there's a use case for installing CiviCRM with an existing settings file. Is there a different way I should be doing this?

For context we have a large amount of Drupal Config saved in config/sync that we would like to import. As well as a bunch of CiviCRM config defined in code.

3
  • 1
    i am probably misunderstanding, but having created 'clean' database, is there something preventing you then loading a backup of your existing db in to it? (using the skip triggers options eg civicrm.stackexchange.com/a/620/96
    – petednz - fuzion
    Commented Oct 21 at 18:11
  • Yeah, good question. The size of our production database is ~20GB and we're sharing this development environment with volunteers and contractors that we don't want to have access to our production data Commented Oct 21 at 19:53
  • 1
    If you are needing eg Custom Fields in the db, and Custom Activity Types then you may need to look at github.com/CiviCooP/org.civicoop.configitems
    – petednz - fuzion
    Commented Oct 22 at 2:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.