I am working with data migrate of customer data only from Magento Version 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/

This error came

Invalid map filename: /var/www/html/magento2/vendor/magento/data-migration-tool/

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

2 Answers 2


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:


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.

  • Can you specify what the exact path you have give? I have also get same error i try app/code/Vendor/Migration/ and also /var/www/html/app/code/Vendor/Migration/ But given error Invalid map filename
    – HaFiz Umer
    Jul 13, 2020 at 10:47
  • Thanks for this, what a total shambles... requiring absolute paths is something I'd expect from a school project. Good old Magento 2.
    – BlueC
    Sep 29, 2022 at 11:32

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/" etc pp.

Then THIS step worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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