0

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.

asked Feb 22, 2022 at 15:48

1 Answer 1

0

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

answered Feb 22, 2022 at 16:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.