The mysql2jsonl tool provides an efficient way to export data from a MySQL database to JSONL (JSON Lines) files and to import data back into a database from these files. It is highly configurable and optimized for performance with concurrency and batching in mind!
You can use INSERT IGNORE INTO mysql query with the help of insertFromSelect() method in Magento 2 with use of magento best standard in your module.
This Magento 2 script by AquiveMedia automates importing databases from remote servers via SSH with configurable environment settings. It supports table exclusions and compression, making it ideal for efficient, tailored migrations.