f

Hulp nodig? Wij helpen graag

How do I download a database with SSH?

When downloading a database in phpMyAdmin it can happen that it fails because the database is too large. An alternative to this is downloading the database through SSH. In this article we explain which steps you should follow.

Steps

Step 1. Login to SSH with your cPanel user. You can do this via an SSH client / Terminal on your computer with the Terminal in cPanel.

Step 2. Navigate in SSH to the folder where you want to place the .sql file, you do this with the following commands:

View current folder contents:

ls

Open a folder:

cd FOLDER NAME

Open parent folder:

cd ..

Step 3. Once you are in the folder where you want to place the .sql database export, run the following command:

mysqldump -p -u USER NAME DATABASE NAME > FILE.sql

Step 3a. At the USER NAME you enter the username of the database user, so the password of this database user is required. Optionally you can reset it in cPanel via MySQL Databases.

Step 3b. In the DATABASE NAME you enter the full database name.

Step 3c. At FILE.sql enter the name of the .sql file you want to export, this is important so you're able to find the exported file for downloading it to your computer.

Step 4. If all entered data is correct the .sql file will now be exported to your file storage. This may take some time, depending on the size.

Step 5. Once the export has been completed you can download the file through the cPanel file manager or through FTP.

Also read: How do I use SSH?

This knowledge base article was last updated on: March 11, 2019

Heeft dit artikel je geholpen?

Status

Ga naar onze statuspagina voor een overzicht van recente storingen en onderhoud.

Openingstijden

Maandag — donderdag 9:00 — 21:00
Vrijdag 9:00 — 17:00
Zaterdag — zondag 10:30 — 17:00