Coder Social home page Coder Social logo

migration_boilerplate's Introduction

Drupal 8/9 Migration Boilerplate

Use this module and the directions below as a starting point to easily get your Drupal 6/7 sites into Drupal 8/9.

SETUP

  1. Setup both your Drupal 6/7 and Drupal 8/9 sites in Lando.
  • If using Drupal 8, configure the site to use Drush 9
  • If using Drupal 9, pin your Drush to 10.3 until this issue is resolved
  1. Copy the .lando.yml file in this repo to your Drupal 8/9 site root (change the app name)
  2. Export your Drupal 6/7 DB with lando db-export dump.sql.gz
  3. Copy the settings.local.php file in this repo to your Drupal 8/9 sites/default folder.
  4. Import the Drupal 6/7 DB into the Drupal 8/9 Site with lando db-import --host=d7db --user=drupal7db dump.sql.gz
  5. Run this in your Drupal 8/9 project root:
lando composer require 'drupal/migrate_plus:^5.0'
lando composer require 'drupal/migrate_tools:^5.0'
lando composer require 'drupal/migrate_upgrade:^3.0'
  1. Enable this module.
  2. Run the following commands in your D8 site:
lando drush migrate-upgrade --legacy-db-key=migrate --configure-only
lando drush config-export --destination=/tmp/migrate
lando ssh -s appserver -u root
cp /tmp/migrate/migrate_plus.* /app/path/to/migration_boilerplate/unused_config
chown -R www-data:www-data /app/path/to/migration_boilerplate/unused_config
exit
lando drush cim -y
  1. Run lando drush ms to make sure the configs made it over.
  2. If you want to to remove the red warnings for missing D6 or D7 migrations, add this code snippet to your migration_boilerplate.module file and adjust the code.

migration_boilerplate's People

Contributors

uberhacker avatar rjbain avatar

Stargazers

 avatar  avatar bassline121 avatar Luis Castillo avatar vaibhav singh avatar Darrell Ulm avatar denford avatar  avatar Michael Zumstein avatar Jorge Vasquez avatar Casey Grzecka avatar  avatar mike stewart avatar  avatar Karen Dickenson avatar  avatar  avatar Simon Lindsay avatar Joel avatar Ahmed Samir avatar Oksana Cyrwus avatar

Watchers

Jorge Vasquez avatar James Cloos avatar John Ouellet avatar vaibhav singh avatar Oksana Cyrwus avatar

migration_boilerplate's Issues

Database Error

Thank you for the great migration guide!
I'm receiving an error when attempting to import the D7 database using "lando db-import --host=d7db --user=drupal7db dump.sql.gz":
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/bitnami/mariadb/tmp/mysql.sock' (2)

I have stopped and restarted the database several times, but I still can't get past this step. How do I change the socket location in Lando? My site and its database are hosted on Pantheon and I am using a local copy that I downloaded using "lando pull", but I don't know how that would cause such an error.

Both databases are showing up when I use "lando info":

  { service: 'database',
    urls: [],
    type: 'mariadb',
    healthy: true,
    internal_connection: { host: 'database', port: '3306' },
    external_connection: { host: '127.0.0.1', port: '54703' },
    healthcheck: 'mysql -uroot --silent --execute "SHOW DATABASES;"',
    creds: { database: 'drupal8', password: 'drupal8', user: 'drupal8' },
    config: { database: '/home/mlittler/.lando/config/drupal8/mysql.cnf' },
    version: '10.3',
    meUser: 'www-data',
    hasCerts: false,
    hostnames: [ 'database.internationaltest.internal' ] },
  { service: 'd7db',
    urls: [],
    type: 'mariadb',
    healthy: true,
    internal_connection: { host: 'd7db', port: '3306' },
    external_connection: { host: '127.0.0.1', port: true },
    healthcheck: 'mysql -uroot --silent --execute "SHOW DATABASES;"',
    creds: { database: 'drupal7db', password: 'drupal7db', user: 'drupal7db' },
    config: {},
    version: '10.3',
    meUser: 'www-data',
    hasCerts: false,
    hostnames: [ 'd7db.internationaltest.internal' ] }

Thank you for any suggestions you have regarding this error.

simplify config export

Unless I'm missing something....

In the readme.md I think the following lines can be simplified. In other words, I don't see a need to separately manually ssh into lando app just to copy files. Instead, just export directly to the app.

lando drush config-export --destination=/tmp/migrate
lando ssh -s appserver -u root
cp /tmp/migrate/migrate_plus.* /app/path/to/migration_boilerplate/unused_config
chown -R www-data:www-data /app/path/to/migration_boilerplate/unused_config
exit

to

lando drush config-export --destination=/app/path/to/migration_boilerplate/unused_config

in my .lando.yml I am using this line

lando drush config-export --destination=/app/web/modules/contrib/migration_boilerplate/unused_config

cim not working

image

Hello Team,
I followed all steps but during "lando drush cim -y" I am facing below issue.
This import is empty and if applied would delete all of your configuration, so has been rejected.

I also copied files in config/sync folder and added $settings['config_sync_directory'] = 'config/sync'; but still facing issue.

Could you please help here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.