Shared hosting (cPanel) and reseller (WHM) do not include SSH or Terminal access. To copy or restore a database use phpMyAdmin or JetBackup. If you need mysqldump from the command line, order a VPS.
Export with phpMyAdmin
- In cPanel, open phpMyAdmin.
- Select the database in the left-hand menu.
- Open the Export tab, leave the Quick method and SQL format, and click Go.
- Save the
.sqlfile on your computer.
For large databases (over 1 GB) phpMyAdmin may abort the download. In that case download the copy from JetBackup or open a support ticket.
Import with phpMyAdmin
- Open phpMyAdmin and select the destination database (it must exist and be empty, or you accept that tables will be overwritten).
- Open the Import tab, choose the
.sqlfile and click Go.
Automatic copies with JetBackup
Every hosting plan includes JetBackup every 6 hours, stored for up to 2 months in a different datacenter. From cPanel you can restore a specific database or download the copy, with no commands.
If you want to check a cron job (for example a PHP backup script), see Checking the output of a cron job.