How to migrate delta data using UB Data Migration Pro

Delta migration is worth noting when you plan to migrate data from Magento 1 to Magento 2.

This article informs you which delta migration options UB Data Migration Pro provides and how you should use them. All of the important steps that have to be carried out for the delta migration are covered in this article. Additionally, frequently asked questions are also described in detail to give you a fundamental understanding of the delta migration feature.

Scope of the delta migration

Delta migration was first introduced with UB Data Migration Pro V3.0.

Delta migration is used in the last stage of the migration process to move data that was created or changed since the last time you migrated data. With the help of UB Data Migration Pro, you can append only new Magento 1 entries to Magento 2 where new updates occur.

By default, you can perform delta migration to transfer the following data changes from Magento 1 to Magento 2:

  • All new data in Magento 1 that has been added since you started the first data migration
  • All data in Magento 1 that has been changed since the first data migration.

How to run the delta migration using UB Data migration Pro

There are two ways to go about running the delta migration when using UB Data Migration Pro extension:

Running in GUI mode:
The ability to run delta migration in GUI mode is provided under UB Data Migration Pro’s dashboard right in your Magento 2’s backend. You can do delta migration using GUI Delta button as shown in the screenshot below:

Migrate Delta data using GUI mode

Delta migration using GUI mode

You perform delta migration using GUI mode only if you migrate newly added data from your Magento 1 to Magento 2.

Using CLI command mode:
In addition to the standard GUI mode above, you can run the delta migration in terminal.

If you migrate both newly added data and modified data from your Magento 1 to Magento 2 since the first migration, you need to perform the delta migration with the CLI mode (using the --mode=update parameter).

The CLI command mode contains two methods that can be used to run the delta migration:

  • Run the delta migration for all steps:
    php -f bin/ubdatamigration run --mode=update
  • Run the delta migration for a specific step:
    php -f bin/ubdatamigration run --step=STEP_INDEX --mode=update 

    You simply update the STEP_INDEX parameter with specific step you want to perform the delta migration (You can refer to this article to learn more about all steps available in UB Data Migration Pro’s migration process). Following is an example of running delta migration for step #5 only:

    php -f bin/ubdatamigration run --step=5 --mode=update

    Please note the --mode=update will also overwrite the existing Magento 2 data that has been migrated from Magento 1.

In UB Data Migration Pro’s older versions, if you wanted to update the most recent data of customers, orders or other customer-related data, you had to reset and re-migrate from scratch that data portion. The Reset option still allows you to transfer the latest Magento 1 data to Magento 2, however it takes extra time due to said re-migration processes. While less important for small database, this is critical for large databases.

Delta migration tutorial video

We’ve crafted a tutorial video to walk you through the whole data migration process. It will show you how to perform the delta migration with UB Data Migration Pro.

Frequently asked questions about the delta migration

As a best practice, you should first review the FAQs below to prepare for migrating delta data.

  • Q1. Imagine that we migrate a product, and then we update this product in the source (eg. stock quantity, attribute value, product’s name etc.). Would the new data be updated in the target with the delta migration?A. Yes, this is where the delta migration feature will help you. It will port only changes since your last migration to your Magento 2. And you can perform the delta migration with the mode=update to update such changed data.
  • Q2. What happens when orders are synced that have no customer data because new customers were created since the customer sync’d?A. For this case, you have to run the delta migration for Step #6 (Migrating Customers) first. And then, you perform the delta migration for Step #7 (Migrating Sales Data) to handle new Sales orders.
  • Q3. I’m asking if an order comes into the Magento 2 in between the migration and delta migration. If we do a migration into a magento 2 store and then a customer places an order in the magento 2 install and a day later we do a delta migration would it work and keep the order in magento 2?A. The delta migration does not affect the new order (if any) in your Magento 2 instance (between the first migration and delta migration). However, it would be best if you can verify all migrated data carefully and complete the delta migration step (to port new order from Magento 1) before officially launching your new Magento 2 site.
  • Q4. Would Delta Migration take the same amount of Time as the initial Migration or should that be quicker?A. It depends on the specific steps you run the delta migration, and the delta mode you perform (either via the GUI or CLI mode).

    With the CLI mode, when you run the delta migration without the --mode=update, it will be faster, since it only migrates the newly added data if exist.

    However, running the delta migration with the --mode=update means that the migration will process all data to check and update.

    If you still plan to run the delta migration next time, you should not delete any migrated data to avoid unexpected conflicts. You can simply disable unused data, and only delete if you no longer run the delta migration.

  • Q5. Some of our M1 store customers have not come over after the delta migration. A. In order to view all new migrated customers after the delta migration, you need to run reindexing command first.
  • Q6. If we for example add new products on our old site, the newly added products when delta migrated will not move to the newly created categories, so how would this work?A. The newly added products in Magento 1 will be migrated to Magento 2 in the delta migration. If you have newly added M1’s categories, you must perform the delta migration for those categories in the Step #4 of our migration tool first. And then, run the delta migration in the Step #5 to migrate newly added products.
  • Q7. Also after step 7 delta migration (Migrating Sales), is it compulsory to do the delta import for step 8 (Migrating Others) or I can skip this for delta and push the website live.A. The data on the Step #8 is optional, if such data section is not needed, you can skip the delta migration in this step.
  • Q8. Will It be possible just to reimport all the customers?A. In order to run the delta migration on customer’s data only, you can use the CLI command: php -f bin/ubdatamigration run --step=6 --mode=update
  • Q9. Does UB Data Migration Pro allow to connect directly with the database of my Magento 1 live site to run delta migration?A. Yes.

    If you migrate data directly from the live production server (source server) to the staging server (destination server) in the first time, then you simply perform delta migration either via the GUI delta button or using the CLI mode. If your live production server (source server) is on a different server, you need to enable a remote connection from your M2 server to M1’s MySQL server. More details about setting up a remote database connection are documented in this Magento DevDocs guideline.

    Alternatively, you can perform the latest database dump of your Magento 1’s live site and then import it into your Magento 1 database instance where our migration tool worked in your first data migration. Then, you can start the delta migration with the same steps as mentioned above.

  • Further reading

    To learn more about Magento data migration, including frequently asked questions or pitfalls, read the beginning of the full FAQs -- Part 1, Part 2, and Part 3.

    For more on the issues that you might see during the migration process, read our public support helpdesk here.

    Finally, if you’re curious about our completed data migration projects, you can read the case studies here, here, and here.

Written By

Comments