2

I am working with data migrate of customer data only from Magento Version 1.12.0.2 EE to Magento Version 2.2.3 EE using data migration tool. (https://devdocs.magento.com/guides/v2.0/migration/migration-tool.html)

Run this command:

php bin/magento migrate:settings -r /var/www/html/magento2/vendor/magento/data-migration-tool/etc/commerce-to-commerce/1.12.0.2/config.xml

This error came

[Migration\Exception]
Invalid map filename: /var/www/html/magento2/vendor/magento/data-migration-tool/

2
  • Nandhini, did you got any solution for this error – senthil Nov 15 '18 at 11:52
  • Sentil, Do you check with your mapping config file?, It is incorrect mapping path, the error will occur. – Nandhini Nagaraj Jul 2 '19 at 11:42
1

I know this is old, but I've just experienced this error myself.

If you've extended the Magento_DataMigrationTool with a custom module and you're config.xml file is specifying a custom map file in your component, then you may need to specify the full path to that map file (relative to the M2 installation root).

If your module's config.xml specifies a map like this:

<config>
    .
    .
    <options>
        <map_file>path/to/map.xml</map_file>

Then path/to/map.xml should be relative to the Magento installation root, not your own modules root.

I've seen some information that suggest this problem isn't encountered on all versions of the Data Migration Tool.


Update 2020-09-09

Looking into this a bit further and have found a bug in version 2.3.4 of the migration module.

When trying to set a custom settings map file, the migration module reads the location from your etc/opensource-to-opensource/x.x.x.x/config.xml file, but prepends the path to the root of the migration module (/magento_root/vendor/magento/data-migration-tool/), which obviously results in a file path that does not resolve to your custom setting map file. A possible fix to this would be to set a path using .. to navigate up from the migration module and then into your own module. Other than that you've probably have to modify the \Migration\Reader\Settings::validate method.

This bug appears to be fixed in 2.3.5. The \Migration\Reader\Settings::validate method has been modified to check for an absolute path to you settings map file, and if that doesn't resolve to a file, then assume the path given is relative to the migration module root.

1
  • Can you specify what the exact path you have give? I have also get same error i try app/code/Vendor/Migration/1.9.3.10/map.xml and also /var/www/html/app/code/Vendor/Migration/1.9.3.10/map.xml But given error Invalid map filename – HaFiz Umer Jul 13 '20 at 10:47
0

I now also migrate vom 1 to 2.3.5 and had this problem. It is correct that in the Settings.php this bug is solved, I echoed the "$mapFile" in this error message and there only was the "etc/.../" path.

So i had to add the WHOLE path from my webserver system root like

"/customer/account/hosting/contract/magento2-root/app/code/Vendor/Migration/etc/opensource-to-opensource/1.9.3.4/map.xml" etc pp.

Then THIS step worked.

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.