2

I have a Drupal 8 application with mysql as database. I installed bunch of third part modules such as domain, search_api, pdf etc... Most I installed using composer and a very few using "Install module". Configured few content types, created few views, pages, configured apache solr for search indexing...

Now I have requirement to set up everything in a higher environment using oracle as database. I was able to setup a blank drupal 8 application with oracle database.

Question: Installing all the modules in new installation ? My thoughts -> Edit the composer.json to add modules and run composer update and manually install rest of the modules or Is there a better way to import all the installed modules to new app.

Question: Configuration migrate ? I was thinking of using configuration > development > Configuration synchronization to export and import all the configurations.

Question: Data migrate ? I used migration module to import content and upload files. If everything works till here, data migration is the last priority. Good to have. I have one custom module too created for migration purposes. I used this migration module to migrate csv data to druapl8-mysql application. If everything works, I want to migrate the same csv content to drupal8-oracle application.

This exercise will help us to migrate and duplicate setup to test environments too. Please suggest an ideal process for the migration.

1 Answer 1

3

Question: Installing all the modules in new installation

Answer: Yes add all modules to root composer.json file so only have to run composer install or later composer update

Question: Configuration migrate

Answer: Configure your sites sync folder 'in settings.php' and run drush cex to export the current sites config (then you can git commit the changes and deploy to new environment) and run drush cim on new environment to import changes.

Question: Data migrate

Posable Answers: now this one can get kinda tricky and have a lot of options for this ... which depends largely on what you want to keep / what you don't.

Simple option: copy database - good old fashion export database and then import it.

Content migration option: look in to https://www.drupal.org/project/default_content_deploy its like config import/export only for entity data (which again can be commited to repo and deployed) eg drush default-content-deploy:export and drush default-content-deploy:import

use normal migrate api option. use a seed database option.

really should just have all the stuff you need in a git repo then you just tag the release ... push to the environment and run some commands or have some automated scripts to run the commands for you look in to stuff like... https://chromatichq.com/blog/drupal-8-deployments-jenkins-github-slack and https://hernani.pt/automatic-update-drupal8

2
  • I think this is missing information. You can't export config from one site and import it into a completely different site, it will complain about UUIDs. Last time I did this, I used a shell script to strip it from config files before importing.
    – Kevin
    Commented Jan 10, 2019 at 1:35
  • 2
    @keven you can :) see drupal.stackexchange.com/questions/150481/… drush config-get "system.site" uuid drush cset system.site uuid (other uuid from above)
    – taggartJ
    Commented Jan 10, 2019 at 1:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.