I am new in magento commerce cloud. I need to setup the magento store in my local system. I have downloaded the files from the commerce git and it is working fine. But how can I access the database? I need to import the database to my local system. I have created the database backup using the below command.
vendor/bin/ece-tools db-dump
How can I download it in to my local system? Please help me
Best Answer
As MSA has noted, you can ssh into the machine and use
ece-tools db-dump
and then rsync the database dump down locally.Here is the rsync commandAnother option is to utilize the
magento-cloud
CLI utility. You can download the CLI utility with these instructions: https://devdocs.magento.com/guides/v2.1/cloud/before/before-workspace-magento-prereqs.html#cloud-ssh-cli-cli-installOnce you have that installed you can create a dump like this:
magento-cloud db:dump -p <PROJECT ID> -e <ENVIRONMENT NAME>
The `magento-cloud CLI will also allow you to open up an SSH tunnel to the database so you could access it locally.