Migrate d2d-module (Drupal)

Uit De Vliegende Brigade
Ga naar: navigatie, zoeken

De migrate_d2d-module importeert data van Drupal 5, 6 of 7 vanuit een Drupal 7-site. Werkt als een trein voor migratie van gebruikersaccounts. Wat deze module kan importeren:

  • Accounts & rollen
  • Taxonomieën
  • Bestanden: Gebruiker-afbeeldingen en overige bestanden
  • Nodes van het type: Afbeeldingen, producten, stories, webformulieren, en vermoedelijk nog meer

Wat deze module niet kan migreren: Orders.

Installatie

  • Je moet de module installeren op de Drupal 7-doelsite
  • Installatie: drush en -y migrate_d2d, migrate_d2d_ui

Gebruikersinterface

Je vindt de interface via:

Content » Migrate » Import from Drupal

Migratie bestanden

migrate_d2d kan oa. bestanden migreren. Dat loopt niet geheel foutloos, maar voor mij belangrijker: Die bestanden staan los van eventuele node waar ze bij horen. Dat maakt de losse migratie van bestanden vrij zinloos. Hetzelfde geldt voor handmatig kopiëren-en-plakken: De crux zit 'm in de associatie van bestanden (productafbeeldingen in dit geval) met overige objecten.

Specificatie van het bronpad is een beetje vreemd, want /files/ lijk je te moeten weglaten uit de padnaam
Vreemde foutmelding omtrent een leeg argument voor copy(). Misschien worden spaties in bestandsnamen niet escaped?
Bestanden belanden in de map /var/www.../files/files. Is dat geen vergissing?

Nog interessanter: Migreert deze module domweg alle bestanden, of alleen de bestanden die daadwerkelijk gebruikt worden? Ik heb de indruk dat-ie alleen gebruikte bestanden overfietst, en da's verrekte handig! Aansluitend met kopiëren en plakken alle bestanden teruggezet van files/files/ naar /files/.

Zie ook Migratie Übercart 2.x naar Drupal Commerce 1.x#Migratie productafbeeldingen: CMU.

Casus feb. 2016: 11.000 accounts importeren

In februari 2016 heb ik moeiteloos 11.414 accounts geïmporteerd:

  • Alleen accounts geïmporteerd: Overige objecten (waaronder rollen en profielfoto's) waren niet relevant, en gaven in het verleden complicaties
  • Pas na een paar minuten verscheen er enige informatie omtrent voortgang. Geduld is een schone zaak
  • Tijdsduur complete migratie: Ca. een uur.

Casus mrt. 2016

  • Step 4: Files: Niet vergeten om het pad mee te geven, bv. /var/www/example/com/sites/default/files/

Zie ook

Bronnen

Appendix: Uitvoer bij import 11.000 accounts

Deze zin werd ca. 50x herhaald:

Encryption of secure migration information is not supported. Ensure the Encrypt module or mcrypt 
PHP extension is installed for this functionality.

Daarna:

    Processed 1 (1 created, 0 updated, 0 failed, 0 ignored) in 0 sec (2716/min) - done with 'b755a3db1Role'
    Processed 6297 (6294 created, 0 updated, 0 failed, 3 ignored) in 216.2 sec (1747/min) - continuing with 'b755a3db1User'
    Processed 360 (357 created, 0 updated, 0 failed, 3 ignored) in 27.8 sec (771/min) - continuing with 'b755a3db1User'
    Processed 329 (326 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (701/min) - continuing with 'b755a3db1User'
    Processed 306 (303 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (653/min) - continuing with 'b755a3db1User'
    Processed 254 (251 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (540/min) - continuing with 'b755a3db1User'
    Processed 237 (234 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (503/min) - continuing with 'b755a3db1User'
    Processed 210 (207 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (445/min) - continuing with 'b755a3db1User'
    Processed 205 (202 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (435/min) - continuing with 'b755a3db1User'
    Processed 191 (188 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (405/min) - continuing with 'b755a3db1User'
    Processed 171 (168 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (361/min) - continuing with 'b755a3db1User'
    Processed 157 (154 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (331/min) - continuing with 'b755a3db1User'
    Processed 140 (137 created, 0 updated, 0 failed, 3 ignored) in 27.8 sec (295/min) - continuing with 'b755a3db1User'
    Processed 130 (127 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (273/min) - continuing with 'b755a3db1User'
    Processed 110 (107 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (230/min) - continuing with 'b755a3db1User'
    Processed 101 (98 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (211/min) - continuing with 'b755a3db1User'
    Processed 84 (81 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (174/min) - continuing with 'b755a3db1User'
    Processed 86 (83 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (179/min) - continuing with 'b755a3db1User'
    Processed 98 (95 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (204/min) - continuing with 'b755a3db1User'
    Processed 73 (70 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (151/min) - continuing with 'b755a3db1User'
    Processed 68 (65 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (140/min) - continuing with 'b755a3db1User'
    Processed 63 (60 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (129/min) - continuing with 'b755a3db1User'
    Processed 66 (63 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (135/min) - continuing with 'b755a3db1User'
    Processed 55 (52 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (112/min) - continuing with 'b755a3db1User'
    Processed 71 (68 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (146/min) - continuing with 'b755a3db1User'
    Processed 48 (45 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (97/min) - continuing with 'b755a3db1User'
    Processed 56 (53 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (114/min) - continuing with 'b755a3db1User'
    Processed 19 (16 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (34/min) - continuing with 'b755a3db1User'
    Processed 26 (23 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (49/min) - continuing with 'b755a3db1User'
    Processed 34 (31 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (67/min) - continuing with 'b755a3db1User'
    Processed 49 (46 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (99/min) - continuing with 'b755a3db1User'
    Processed 55 (52 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (112/min) - continuing with 'b755a3db1User'
    Processed 108 (105 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (226/min) - continuing with 'b755a3db1User'
    Processed 44 (41 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (88/min) - continuing with 'b755a3db1User'
    Processed 55 (52 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (112/min) - continuing with 'b755a3db1User'
    Processed 131 (128 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (275/min) - continuing with 'b755a3db1User'
    Processed 105 (102 created, 0 updated, 0 failed, 3 ignored) in 27.8 sec (220/min) - continuing with 'b755a3db1User'
    Processed 148 (145 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (312/min) - continuing with 'b755a3db1User'
    Processed 158 (155 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (334/min) - continuing with 'b755a3db1User'
    Processed 268 (265 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (570/min) - continuing with 'b755a3db1User'
    Processed 260 (257 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (552/min) - continuing with 'b755a3db1User'
    Processed 71 (68 created, 0 updated, 0 failed, 3 ignored) in 27.9 sec (146/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.1 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 28.9 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 29.6 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 29.9 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.5 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.6 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 29.9 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.3 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.1 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 29.8 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.1 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 29.2 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 29.8 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.1 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.3 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 29.9 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 29.7 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.1 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.5 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.5 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 29.7 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.8 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 31.3 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.5 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.4 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.6 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.7 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.3 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.6 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.7 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 31.1 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.9 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.5 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.7 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.8 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.6 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 30.7 sec (2/min) - continuing with 'b755a3db1User'
    Processed 4 (1 created, 0 updated, 0 failed, 3 ignored) in 31 sec (2/min) - continuing with 'b755a3db1User'

Statusoverzicht aan het eind:

Task	Status	Items	Imported   Unprocessed	Messages   Throughput   Last imported
Role	Idle	1	1	   0	        0	   2400/min	2016-02-25 15:50:31
User	Idle	11415	11412	   0	        2	   2/min	2016-02-25 16:32:05