1

so I'm attempting to run a migration from Magento 1.9.2.4 to Magento 2.2.5

I've installed the Migration Tool, made all the necessary changes to the config.xml file, and have tried to start the process but I get..

Migration\Exception]
  Invalid config filename: /vendor/magento/data-migration-tool/etc/opensource- 
to-opensource/1.9.2.4/config.xml

This is what I'm attempting to run...

php bin/magento migrate:settings --reset /vendor/magento/data-migration- 
tool/etc/opensource-to-opensource/1.9.2.4/config.xml

I've double checked and validated the config.xml and the connected config.xsd files and it flags up an error with the .xsd file...

InvalidRegex: Pattern value '[-/A-Za-z0-9\._]+\.(xml|dist)' is not a valid 
regular expression. The reported error was: ''-' is an invalid character 
range. Write 

I'm not entirely sure what to do here. Others make mention of this but I can't find a specific solution. I've never actually edited the .xsd file, so find this issue puzzling.

HEre is my config file

<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="Data Integrity Step">
        <integrity>Migration\Step\DataIntegrity\Integrity</integrity>
    </step>
    <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>
    <step title="PostProcessing Step">
        <data>Migration\Step\PostProcessing\Data</data>
    </step>
</steps>
<steps mode="delta">
    <step title="Customer Attributes Step">
        <delta>Migration\Step\Customer\Delta</delta>
        <volume>Migration\Step\Customer\Volume</volume>
    </step>
    <step title="Map Step">
        <delta>Migration\Step\Map\Delta</delta>
        <volume>Migration\Step\Map\Volume</volume>
    </step>
    <step title="Log Step">
        <delta>Migration\Step\Log\Delta</delta>
        <volume>Migration\Step\Log\Volume</volume>
    </step>
    <step title="OrderGrids Step">
        <delta>Migration\Step\OrderGrids\Delta</delta>
        <volume>Migration\Step\OrderGrids\Volume</volume>
    </step>
    <step title="SalesIncrement Step">
        <delta>Migration\Step\SalesIncrement\Delta</delta>
        <volume>Migration\Step\SalesIncrement\Volume</volume>
    </step>
</steps>
<source>
    <database host="localhost" name="x" user="x" password="x" />
</source>
<destination>
    <database host="localhost" name="x" user="x" password="x"/>
</destination>
<options>
    <map_file>etc/opensource-to-opensource/1.9.2.4/map.xml</map_file>
    <eav_map_file>etc/opensource-to-opensource/map-eav.xml</eav_map_file>
    <eav_document_groups_file>etc/opensource-to-opensource/eav-document-groups.xml</eav_document_groups_file>
    <eav_attribute_groups_file>etc/opensource-to-opensource/eav-attribute-groups.xml</eav_attribute_groups_file>
    <log_map_file>etc/opensource-to-opensource/map-log.xml</log_map_file>
    <log_document_groups_file>etc/opensource-to-opensource/log-document-groups.xml</log_document_groups_file>
    <settings_map_file>etc/opensource-to-opensource/settings.xml</settings_map_file>
    <customer_map_file>etc/opensource-to-opensource/map-customer.xml</customer_map_file>
    <customer_document_groups_file>etc/opensource-to-opensource/customer-document-groups.xml</customer_document_groups_file>
    <customer_attribute_groups_file>etc/opensource-to-opensource/customer-attribute-groups.xml</customer_attribute_groups_file>
    <delta_document_groups_file>etc/opensource-to-opensource/deltalog.xml</delta_document_groups_file>
    <order_grids_document_groups_file>etc/opensource-to-opensource/order-grids-document-groups.xml</order_grids_document_groups_file>
    <map_document_groups>etc/opensource-to-opensource/map-document-groups.xml</map_document_groups>
    <class_map>etc/opensource-to-opensource/class-map.xml</class_map>
    <tier_price_map_file>etc/opensource-to-opensource/map-tier-price.xml</tier_price_map_file>
    <stores_map_file>etc/opensource-to-opensource/map-stores.xml</stores_map_file>
    <!--
    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>mg_</source_prefix>
    <dest_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>
    <edition_migrate>opensource-to-opensource</edition_migrate>
    <edition_number>1.9.2.4</edition_number>
    <init_statements_source>SET NAMES utf8;</init_statements_source>
    <init_statements_destination>SET NAMES utf8;</init_statements_destination>
    <crypt_key>xrjpunf3198ovo8gulih8yctkl53ibr8</crypt_key>
</options>

Many thanks.

0

Check in your config.xml file

etc/opensource-to-opensource/1.9.2.4/map.xml

    <eav_map_file>etc/opensource-to-opensource/map-eav.xml</eav_map_file>

    <eav_document_groups_file>etc/opensource-to-opensource/eav-document-groups.xml</eav_document_groups_file>

    <eav_attribute_groups_file>etc/opensource-to-opensource/eav-attribute-groups.xml</eav_attribute_groups_file>

    <log_map_file>etc/opensource-to-opensource/map-log.xml</log_map_file>

    <log_document_groups_file>etc/opensource-to-opensource/log-document-groups.xml</log_document_groups_file>

    <settings_map_file>etc/opensource-to-opensource/settings.xml</settings_map_file>

    <customer_map_file>etc/opensource-to-opensource/map-customer.xml</customer_map_file>

    <customer_document_groups_file>etc/opensource-to-opensource/customer-document-groups.xml</customer_document_groups_file>

    <delta_document_groups_file>etc/opensource-to-opensource/deltalog.xml</delta_document_groups_file>

    <order_grids_document_groups_file>etc/opensource-to-opensource/order-grids-document-groups.xml</order_grids_document_groups_file>

    <map_document_groups>etc/opensource-to-opensource/map-document-groups.xml</map_document_groups>

    <class_map>etc/opensource-to-opensource/class-map.xml</class_map>

    <tier_price_map_file>etc/opensource-to-opensource/map-tier-price.xml</tier_price_map_file>

    <stores_map_file>etc/opensource-to-opensource/map-stores.xml</stores_map_file> 

    <customer_attribute_groups_file>etc/opensource-to-opensource/customer-attribute-groups.xml</customer_attribute_groups_file>

    <!--
    In case bulk_size=0 it will be auto-detected for every document.
    -->
    <bulk_size>100</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></source_prefix>
    <dest_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>
    <edition_migrate>opensource-to-opensource</edition_migrate>
    <edition_number>1.9.2.4</edition_number>
    <init_statements_source>SET NAMES utf8;</init_statements_source>
    <init_statements_destination>SET NAMES utf8;</init_statements_destination>
    <crypt_key>f5b73daae42423c828cd62e75c84662b</crypt_key>
</options

Make all extension with .xml and remove .xml.dst All file exists here \vendor\magento\data-migration-tool\etc\opensource-to-opensource

11
  • Thanks - yes I had done all that. I didn't remove the .dist files though. I just copied and renamed. Jul 9 '18 at 9:51
  • Have you added source and destination and also <source_prefix></source_prefix> <dest_prefix></dest_prefix> in your config.xml file? Jul 9 '18 at 9:55
  • In your code why below code repeated? 1) <source_prefix>mg_</source_prefix> <dest_prefix></dest_prefix> <crypt_key>x</crypt_key> 2) <source_prefix /> <dest_prefix /> <crypt_key /> Jul 9 '18 at 10:09
  • Thanks, but that makes no difference. The error remains. Jul 9 '18 at 12:30
  • Please refer github.com/magento/data-migration-tool/issues/503 May this can help you Jul 9 '18 at 13:01
0

It was an issue with the file structure in my original php request.

I was running from within my public_html folder (cd public_html), jumping up a level seemed to have made the difference.

php public_html/bin/magento migrate:settings --reset public_html/vendor/magento/data-migration- tool/etc/opensource-to-opensource/1.9.2.4/config.xml

All fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.