magento / data-migration-tool

Magento Data Migration Tool
https://devdocs.magento.com/guides/v2.3/migration/bk-migration-guide.html
Open Software License 3.0
334 stars 200 forks source link

Custom Config File Path #800

Open carlos-reynosa opened 4 years ago

carlos-reynosa commented 4 years ago

The only way to define a custom config files is by providing a full path or magento/data-migration-tool module install relative path:

https://github.com/magento/data-migration-tool/blob/3c7f83b8eaab690734113f574a26595e61415b62/src/Migration/Reader/Map.php#L83-L84

https://github.com/magento/data-migration-tool/blob/3c7f83b8eaab690734113f574a26595e61415b62/src/Migration/Reader/Settings.php#L96-L98

  1. This contradicts the Docs that Claims you can use Magento install relative path:

The changes here go against what @victor-v-rad said in a similar config issue:

Yes, not only file name should be changed in config.xml file but path also. The only thing is file path can be relative to Data Migration Tool directory or full path. It wont work if you set relative the Magento install directory in option in config.xml file. So would suggest to change the text to something like "Change the file path and name in the <options> node in the config.xml file to the new file path and name accordingly"

https://github.com/magento/devdocs/pull/6732#pullrequestreview-365807119

Related:

It would help to be able to define a custom config file relative to the Magento install path. I'm working within a cloud environment and the full path changes based on the environment.

victor-v-rad commented 4 years ago

Thank you @carlos-reynosa for reporting this issue. Devdocs team should fix it

carlos-reynosa commented 4 years ago

@victor-v-rad It seems that there is an expectation that we should be able to provide a path for a configuration file that is relative to the Magento installation directory. That would allow us to more easily define a new configuration file in a customization module. Only allowing full paths seems very global and environment-specific.

victor-v-rad commented 4 years ago

Using ../../../ path can be a good workaround and you can always do your contribution to the data migration tool for all Magento community

ChameleonDevil commented 4 years ago

I created symbolic links for my custom map.xml, deltalog.xml etc files.

Inside your vendor/magento/data-migration-tool/etc/{type}/{version}... folders, create the symbolic links to your custom path. This is obviously just a work around, and should be handled by the module.

Also, previously tried absolute paths, but for some of the steps, the absolute path gets appended after the relative path. So the only proper way to make sure you have your configs in a custom folder at the moment is with symbolic links.

kamleshsolanki commented 3 years ago

@ChameleonDevil How I can create symbolic links for custom file with vendor file.

carlos-reynosa commented 3 years ago

I haven't had a problem using relative paths.