migrate-from-d7.sh 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #! /bin/bash
  2. export PATH=$Path:/bin:/usr/bin:/usr/local/bin
  3. DATE=`date +%d-%m-%y/%H:%M:%S`
  4. # https://www.mediacurrent.com/blog/memory-management-migrations-drupal-8/
  5. echo -e "* * * * * * * * * * * * * * * *"
  6. echo -e "* *"
  7. echo -e "* Migration *"
  8. echo -e "* *"
  9. echo -e "* $DATE *"
  10. echo -e "* *"
  11. echo -e "* * * * * * * * * * * * * * * *"
  12. echo " "
  13. echo "Reseting migrations states"
  14. drush mrs d7_allpublicfiles
  15. drush mrs d7_taxonomy_term_thesaurus
  16. drush mrs d7_taxonomy_term_thesaurus_i18n
  17. drush mrs d7_taxonomy_term_tags
  18. drush mrs d7_taxonomy_term_tags_i18n
  19. drush mrs d7_taxonomy_term_company
  20. drush mrs d7_taxonomy_term_showroom
  21. drush mrs d7_users
  22. drush mrs d7_user_profile
  23. drush mrs d7_uc_roles_license
  24. drush mrs d7_node_materiau
  25. drush mrs d7_node_materiau_i18n
  26. drush mrs d7_node_article
  27. drush mrs d7_node_article_i18n
  28. drush mrs d7_simplenews_nodes
  29. drush mrs d7_simplenews_subscribers
  30. drush mrs d7_flaglists
  31. drush mrs d7_flaglistitems
  32. sleep 5
  33. echo " "
  34. echo "Migrating Files"
  35. drush mim d7_allpublicfiles --feedback="1000"
  36. sleep 5
  37. echo " "
  38. echo "Migrating Taxonomy"
  39. echo "Migrating thesaurus"
  40. drush mim d7_taxonomy_term_thesaurus --update --feedback="100"
  41. echo " "
  42. drush mim d7_taxonomy_term_thesaurus_i18n --update --feedback="100"
  43. sleep 5
  44. echo " "
  45. echo "Migrating tags"
  46. drush mim d7_taxonomy_term_tags --update --feedback="100"
  47. echo " "
  48. drush mim d7_taxonomy_term_tags_i18n --update --feedback="100"
  49. sleep 5
  50. echo " "
  51. echo "Migrating companies"
  52. drush mim d7_taxonomy_term_company --update --feedback="1000"
  53. sleep 5
  54. echo " "
  55. echo "Migrating showroom"
  56. drush mim d7_taxonomy_term_showroom --update --feedback="100"
  57. sleep 5
  58. echo " "
  59. echo "Migrating Users"
  60. drush mim d7_users --update --feedback="1000"
  61. echo " "
  62. drush mim d7_user_profile --update --feedback="1000"
  63. echo " "
  64. drush mim d7_user_profile_customer --update --feedback="1000"
  65. echo " "
  66. drush mim d7_uc_roles_license --update --feedback="1000"
  67. sleep 5
  68. echo " "
  69. echo "Migrating Nodes"
  70. echo "Migrating Materials"
  71. drush mim d7_node_materiau --update --feedback="1000"
  72. echo " "
  73. drush mim d7_node_materiau_i18n --feedback="1000"
  74. sleep 5
  75. echo " "
  76. echo "Migrating breves"
  77. drush mim d7_node_article --feedback="100"
  78. echo " "
  79. drush mim d7_node_article_i18n --feedback="100"
  80. sleep 5
  81. echo " "
  82. echo "Migrating simplenews"
  83. drush mim d7_simplenews_nodes --feedback="200"
  84. drush mim d7_simplenews_subscribers --update --feedback="1000"
  85. sleep 5
  86. echo " "
  87. echo "Migrating flaglists"
  88. drush mim d7_flaglists --feedback="200"
  89. echo " "
  90. drush mim d7_flaglistitems --feedback="200"
  91. sleep 5
  92. echo " "
  93. echo "Regenerating url aliases for nodes and terms"
  94. drush pag all canonical_entities:taxonomy_term
  95. drush pag all canonical_entities:node
  96. sleep 5