migrate-from-d7.sh 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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="100"
  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 --feedback="1000"
  63. echo " "
  64. drush mim d7_uc_roles_license --update --feedback="200"
  65. sleep 5
  66. echo " "
  67. echo "Migrating Nodes"
  68. echo "Migrating Materials"
  69. drush mim d7_node_materiau --feedback="1000"
  70. echo " "
  71. drush mim d7_node_materiau_i18n --feedback="1000"
  72. sleep 5
  73. echo " "
  74. echo "Migrating breves"
  75. drush mim d7_node_article --feedback="100"
  76. echo " "
  77. drush mim d7_node_article_i18n --feedback="100"
  78. sleep 5
  79. echo " "
  80. echo "Migrating simplenews"
  81. drush mim d7_simplenews_nodes --feedback="200"
  82. drush mim d7_simplenews_subscribers --update --feedback="1000"
  83. sleep 5
  84. echo " "
  85. echo "Migrating flaglists"
  86. drush mim d7_flaglists --feedback="200"
  87. echo " "
  88. drush mim d7_flaglistitems --feedback="200"
  89. sleep 5
  90. echo " "
  91. echo "Regenerating url aliases for nodes and terms"
  92. drush pag all canonical_entities:taxonomy_term
  93. drush pag all canonical_entities:node
  94. sleep 5