I'm trying to import a SQL script file into a Magento cloud database.
The script file has about 83k lines of insert statements and it populates one table in the database.
My current progress:
I managed to connect to the remote database using ssh tunneling as explained in the Magento Cloud docs here.
The problem I'm facing is the ssh tunnel connection takes about 3 minutes to complete 800 inserts. You can imagine how long this process will take.
Question:
I would like to know if there is a way for me to upload the SQL script to the remote server and run the import via the CLI instead, which will be faster.
Thanks in advance.
1 Answer 1
Update:
I managed to figure this out myself.
Using the Command: magento-cloud sql < dump.sql i was able to run the import in under a minute.
Also you can use the magento-cloud scp command.
See magento-cloud scp --help for more information