For the complete documentation index, see llms.txt. This page is also available as Markdown.

Import database dump

Since magento-scripts@1.3.0

yarn import-db [dump file path] or npm run import-db [dump file path]

Imports database dump into MySQL container.

Command options

-r, --remote-db

Since magento-scripts@1.6.0

Imports database from the remote server. Currently, the following protocols are supported:

  • ssh://

yarn import-db --remote-db ssh://my-username@my-server.com
npm run import-db -- --remote-db ssh://my-username@my-server.com

Now it will connect via ssh to your server, create dump files (dump-0.sql and dump-1.sql), download them to your projects root folder, merge them into single dump.sql and import to your local instance with applied fixes.

To learn more about this option, read the following guide:

Importing remote database

--with-customers-data

Since mangento-scripts@1.6.1

Does not exclude customers and orders data when importing local and remote database.

If you are importing a remote database and using this option, CMA will create only one dump.sql file with all data inside it.

Usage example:

Last updated