cancel
Showing results for 
Search instead for 
Did you mean: 

Specifying image database in migration tool from v1 to v2

Specifying image database in migration tool from v1 to v2

I'm currently trying to test migrate our site from magento1 to magento2 and I've mostly got the process nailed one sticking point is the product images. Our media location in magento1 is the database which is different to the core database which is specified through the local.xml file as:

 

 

 <disable_local_modules>false</disable_local_modules>
        <resources>
            <db>
                <table_prefix><![CDATA[]]></table_prefix>
            </db>
            <default_setup>
                <connection>
                    <host><![CDATA[DEFAULT_HOST]]></host>
                    <username><![CDATA[DEFAULT_USER]]></username>
                    <password><![CDATA[DEFAULT_PASS]]></password>
                    <dbname><![CDATA[DEFAULT_NAME]]></dbname>
                    <active>1</active>
                </connection>
            </default_setup>
            <media_setup>
                <connection>
                    <host><![CDATA[MEDIA_HOST]]></host>
                    <username><![CDATA[MEDIA_USER]]></username>
                    <password><![CDATA[MEDIA_PASSWORD]]></password>
                    <dbname><![CDATA[MEDIA_NAME]]></dbname>
                    <active>1</active>   
                    <model>mysql4</model>
                    <initStatements>SET NAMES utf8</initStatements>
                    <type>pdo_mysql</type>
                </connection>
            </media_setup>
        </resources>


Now as part of the magento1 to magento2 migration tool it looks like only one database can be specified in the migration config.xml

 

 

 <source>
        <database host="DEFAULT_HOST" name="DEFAULT_NAME" user="DEFAULT_USER" password="DEFAULT_PASSWORD"/>
    </source>

Is there any way to specify the media database in the migration tool or do I need to get everything into a single database for the migration tool to work correctly?

 

Any help much appreciated.

2 REPLIES 2

Re: Specifying image database in migration tool from v1 to v2

Hi @DanSearle,

 

You need to combine everything into single database and then try to run migration over combined database. Magento data migration tool will map the media data from that database only.

 

After successful migration, you can copy the media directory in pub/media in magento 2.

 

Hope this helps you!

Problem Solved ! Click Kudos & Accept as Solution!

 

Re: Specifying image database in migration tool from v1 to v2

Hi @DanSearle 

All media files (images for products, categories, the WYSIWYG editor, and so on) should be copied manually from your Magento 1 install media folder to your Magento 2 install pub/media folder.

However, do not copy the .htaccess files located in the Magento 1 media folder. Magento 2 has its own .htaccess that should be preserved.

 

Reference: http://devdocs.magento.com/guides/v2.0/migration/migration-manually.html

 

It may help you!
Problem Solved? Please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!