Magento 2-Migrationstool – Überprüfen Sie, ob die Migration von 1.9 bis 2.0 CE erfolgreich ist
-
28-09-2020 - |
Frage
mage2\vendor\magento\data-migration-tool\etc
mage2\vendor\magento\data-migration-tool\etc\ce-to-ce
mage2\vendor\magento\data-migration-tool\etc\ce-to-ce\1.9.2.2
mage2\vendor\magento\data-migration-tool\etc\ce-to-ce\1.9.2.2\config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="../../config.xsd">
<source version="1.9.2.2">
<database host="localhost" name="magento9" user="root"/>
</source>
<destination version="2.0.2">
<database host="localhost" name="mage2" user="root"/>
</destination>
<steps mode="settings">
<step title="Settings Step">
<integrity>Migration\Step\Settings\Integrity</integrity>
<data>Migration\Step\Settings\Data</data>
</step>
<step title="Stores Step">
<integrity>Migration\Step\Stores\Integrity</integrity>
<data>Migration\Step\Stores\Data</data>
<volume>Migration\Step\Stores\Volume</volume>
</step>
</steps>
<steps mode="data">
<step title="EAV Step">
<integrity>Migration\Step\Eav\Integrity</integrity>
<data>Migration\Step\Eav\Data</data>
<volume>Migration\Step\Eav\Volume</volume>
</step>
<step title="Customer Attributes Step">
<integrity>Migration\Step\Customer\Integrity</integrity>
<data>Migration\Step\Customer\Data</data>
<volume>Migration\Step\Customer\Volume</volume>
</step>
<step title="Map Step">
<integrity>Migration\Step\Map\Integrity</integrity>
<data>Migration\Step\Map\Data</data>
<volume>Migration\Step\Map\Volume</volume>
</step>
<step title="Url Rewrite Step">
<integrity>Migration\Step\UrlRewrite\Version191to2000</integrity>
<data>Migration\Step\UrlRewrite\Version191to2000</data>
<volume>Migration\Step\UrlRewrite\Version191to2000</volume>
</step>
<step title="Log Step">
<integrity>Migration\Step\Log\Integrity</integrity>
<data>Migration\Step\Log\Data</data>
<volume>Migration\Step\Log\Volume</volume>
</step>
<step title="Ratings Step">
<integrity>Migration\Step\Ratings\Integrity</integrity>
<data>Migration\Step\Ratings\Data</data>
<volume>Migration\Step\Ratings\Volume</volume>
</step>
<step title="ConfigurablePrices step">
<integrity>Migration\Step\ConfigurablePrices\Integrity</integrity>
<data>Migration\Step\ConfigurablePrices\Data</data>
<volume>Migration\Step\ConfigurablePrices\Volume</volume>
</step>
<step title="OrderGrids Step">
<integrity>Migration\Step\OrderGrids\Integrity</integrity>
<data>Migration\Step\OrderGrids\Data</data>
<volume>Migration\Step\OrderGrids\Volume</volume>
</step>
<step title="Tier Price Step">
<integrity>Migration\Step\TierPrice\Integrity</integrity>
<data>Migration\Step\TierPrice\Data</data>
<volume>Migration\Step\TierPrice\Volume</volume>
</step>
<step title="SalesIncrement Step">
<integrity>Migration\Step\SalesIncrement\Integrity</integrity>
<data>Migration\Step\SalesIncrement\Data</data>
<volume>Migration\Step\SalesIncrement\Volume</volume>
</step>
</steps>
<options>
<crypt>
<key>1bc968bd50b96ee18388feaed3bc1f1d</key>
</crypt>
<map_file>etc/ce-to-ce/1.9.2.2/map.xml</map_file>
<eav_map_file>etc/ce-to-ce/1.9.2.2/map-eav.xml</eav_map_file>
<eav_document_groups_file>etc/ce-to-ce/1.9.2.2/eav-document-groups.xml</eav_document_groups_file>
<eav_attribute_groups_file>etc/ce-to-ce/1.9.2.2/eav-attribute-groups.xml</eav_attribute_groups_file>
<log_map_file>etc/ce-to-ce/1.9.2.2/map-log.xml</log_map_file>
<log_document_groups_file>etc/ce-to-ce/1.9.2.2/log-document-groups.xml</log_document_groups_file>
<settings_map_file>etc/ce-to-ce/1.9.2.2/settings.xml</settings_map_file>
<customer_map_file>etc/ce-to-ce/1.9.2.2/map-customer.xml</customer_map_file>
<customer_document_groups_file>etc/ce-to-ce/1.9.2.2/customer-document-groups.xml</customer_document_groups_file>
<customer_attribute_groups_file>etc/ce-to-ce/1.9.2.2/customer-attribute-groups.xml</customer_attribute_groups_file>
<order_grids_document_groups_file>etc/ce-to-ce/1.9.2.2/order-grids-document-groups.xml</order_grids_document_groups_file>
<class_map>etc/ce-to-ce/1.9.2.2/class-map.xml</class_map>
<!--
In case bulk_size=0 it will be auto-detected for every document.
-->
<bulk_size>0</bulk_size>
<!--
Set direct_document_copy = 1 for better performance.
NOTE: 'source' and 'destination' databases MUST be placed on the same MySQL instance
and 'destination' user MUST be granted with 'SELECT' permissions on 'source' database
-->
<direct_document_copy>0</direct_document_copy>
<source_prefix />
<dest_prefix />
<auto_resolve_urlrewrite_duplicates>0</auto_resolve_urlrewrite_duplicates>
<log_file>migration.log</log_file>
<progress_bar_format>%percent%% [%bar%] Remaining Time: %remaining%</progress_bar_format>
<upgrade_customer_password_hash>1</upgrade_customer_password_hash>
</options>
</config>
settings.xml
wird aus dem Pfad kopiert mage2\vendor\magento\data-migration-tool\etc\ce-to-ce
Settings.xml.dist und map.xml.dist am Speicherort mage2\vendor\magento\data-migration-tool\etc hinzugefügt
In der CMD-Eingabeaufforderung führe ich die folgenden Befehle aus settings
Und data
Migration bzw
php bin/magento migrate:settings vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/config.xml
php bin/magento migrate:data vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/config.xml
und es heißt Migration Compelted
.
Nach dem Leeren des Caches und der Neuindizierung sehe ich keine Änderungen in meiner Mage 2.0-Installation.Es ist das gleiche.
So verwenden Sie die Zuordnungsdateien:
1. Rename or copy them to remove the .dist extension.
2. Edit them using the schema located in <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc.
3. Then change config.xml in <options> node with the new name of the file.
- Wie kann ich überprüfen, ob Einstellungen und Daten erfolgreich migriert wurden?
- Habe ich Fehler beim Konfigurieren der Migration oder Konfiguration und Zuordnungsdateien gemacht?
Referenz-URL – http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html
Lösung
Probieren Sie die folgenden Lösungen aus, mit Dateinamen,
magento2/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.1/map.xml
Sie müssen das folgende Etikett darin behalten <source><document_rules>
<ignore>
<field>customer_eav_attribute.is_used_for_customer_segment</field>
</ignore>
Andere Tipps
Ausarbeitung der akzeptierten Antwort mit einigen Ergänzungen.
Für jedes benutzerdefinierte Attribut oder jede benutzerdefinierte Tabelle, bei der Sie einen Integritätsprüfungsfehler wie Ihren erhalten, müssen (oder können) Sie eine Ignorierregel definieren.
Sie sind definiert für <source>
Und <destination>
An <document_rules>
Und <field_rules>
.
Außer ignorieren können Sie verwenden umbenennen Regeln für Dokumente oder Transformationen für Attribute, um einen Adapter für Ihre Migration zu erstellen.Auf diese Weise können Sie eine sinnvolle Transformation durchführen, wenn Sie sie wirklich benötigen.
Die XML-Datei bildet bereits die Grundlage für dieses Extrahieren, Transformieren und Laden (etl).
Sie beschreiben es hier ausführlicher: http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html#migration-config
Die folgende XML zeigt alle möglichen Konfigurationen:
<map xmlns:xs="." xs:noNamespaceSchemaLocation="map.xsd">
<source>
<document_rules>
<ignore>
<document>some_document2</document>
</ignore>
<rename>
<document>some_document</document>
<to>some_dest_document</to>
</rename>
<log_changes>
<document key="primary_key">some_dest_document</document>
</log_changes>
</document_rules>
<field_rules>
<move>
<field>some_document1.field1</field>
<to>some_document1.field2</to>
</move>
<ignore>
<field>some_document3.field8</field>
</ignore>
<transform>
<field>some_document1.field1</field>
<handler class="\Migration\Handler\Convert">
<param name="map" value="[value1:value2;value3:value4;value5:value6;]" />
</handler>
</transform>
</field_rules>
</source>
<destination>
<document_rules>
<ignore>
<document>some_document8</document>
</ignore>
</document_rules>
<field_rules>
<transform>
<field>some_document5.field3</field>
<handler class="\Migration\Handler\SetValue">
<param name="value" value="10" />
</handler>
</transform>
</field_rules>
</destination>
</map>