mage2\vendor\magento\data-migration-tool\etc

etc

mage2\vendor\magento\data-migration-tool\etc\ce-to-ce

ce-to-ce

mage2\vendor\magento\data-migration-tool\etc\ce-to-ce\1.9.2.2

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 是从路径复制的 mage2\vendor\magento\data-migration-tool\etc\ce-to-ce

在 mage2\vendor\magento\data-migration-tool\etc 位置添加了 settings.xml.dist 和 map.xml.dist

在 CMD 提示符下,我正在执行以下命令 settingsdata 分别迁移

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

它说 Migration Compelted.

刷新缓存并重新索引后,我在 Mage 2.0 安装中没有看到任何变化。一样的。

要使用映射文件:

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.
  1. 如何验证设置和数据是否已成功迁移?
  2. 我在配置迁移或配置和映射文件时犯了任何错误?

参考网址 - http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html

有帮助吗?

解决方案

尝试以下解决方案,使用文件名,

magento2/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.1/map.xml

你必须将下面的标签保留在里面 <source><document_rules>

<ignore>   
      <field>customer_eav_attribute.is_used_for_customer_segment</field>
</ignore>

其他提示

详细阐述已接受的答案并添加一些内容。

对于每个自定义属性或表,您都会遇到像您一样的完整性检查错误,您需要(或可以)定义忽略规则。

它们被定义为 <source><destination><document_rules><field_rules>.

除了忽略你还可以使用 改名 文档规则或属性转换来为您的迁移创建适配器。这样,如果您确实需要的话,您可以进行有意义的转变。

xml 已经为这种提取-转换-加载(etl) 提供了基础。

他们在这里更彻底地描述它: http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html#migration-config

下面的 xml 显示了所有可能的配置:

<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>
许可以下: CC-BY-SA归因
scroll top