Cpanel

cPanel: How to Export Import Through SSH

This guide will show you how easy to export dan import database through SSH, especially when you are using cPanel platform within your server hosting. This is hack command and should be used for your better life!

Export process involved to extract database from inside server to outside server. Where import is opposite, which isprocess to extract database from outside to inside server.

Disclaimer

This commands is used where you can’t handle database customer that is too big. ie. more than 100 MB. So need to excecute it through SSH interface. You can type these command directly from logged into SSH without entered to mysq interface first.

Export database

# mysql dbname > dbfile.sql

Where dbname reflect to your current database name that wish to be extracted outside server. Always double check what you are going to execute.

Import database

# mysql dbname < dbfile.sql

Where dbname reflect to your current database name that wish to be extracted outside server. Always double check what you are going to execute.

Additional note to import database: The source for imported database should using .sql format, NOT .sql.zip. If there is condition you found there is .sql.zip format, make sure you unzip first so .sql file extraceted.

Leave a Reply

Your email address will not be published. Required fields are marked *