Get a free website with any plan

See how
CPANEL

Backing up and restoring a single database

Last updated

IN SHORT

Flashcloud customers can back up and restore a single database without touching the rest of their account. Use the Export and Import tabs in phpMyAdmin to download or restore a .sql file. For large or scripted jobs, run mysqldump and mysql over SSH. Target databases must already exist before restoring.

You don't need a full account backup to protect or restore one database. Use phpMyAdmin's Export and Import tabs for a straightforward backup, or mysqldump and mysql over SSH if you want something scriptable. Both work on a single database without touching the rest of your account.

Backing up with phpMyAdmin

Open phpMyAdmin from the portal (Services → your hosting → phpMyAdmin, one-click login). Select the database in the left sidebar, click the Export tab, choose Quick export method and SQL format, then click Go. Your browser downloads a single .sql file containing every table, row, and the structure needed to rebuild it.

For a large database, switch to Custom export method. It lets you exclude specific tables or skip data and export structure only.

Backing up with mysqldump over SSH

If you have SSH access, mysqldump works well for large databases and can be put in a script:

mysqldump -u dbuser -p dbname > dbname-backup.sql

Replace dbuser with a database user that has access to dbname, and dbname with the actual database name (check MySQL Databases in the portal or Manage My Databases in cPanel if you're not sure of the exact name). You'll be prompted for the password. To compress the output directly:

mysqldump -u dbuser -p dbname | gzip > dbname-backup.sql.gz

Restoring a database

In phpMyAdmin, select the target database (create a new one first via MySQL Databases in the portal if you're restoring into a fresh database), click Import, choose your .sql file, and click Go. phpMyAdmin runs the file as a series of SQL statements, recreating tables and reinserting data. Large files can hit PHP's upload limit before they hit phpMyAdmin's own import limit; if the import fails partway through with no clear SQL error, that's a likely cause.

Over SSH, restoring is the reverse of the dump:

mysql -u dbuser -p dbname < dbname-backup.sql

For a gzip-compressed dump:

gunzip < dbname-backup.sql.gz | mysql -u dbuser -p dbname

The target database must already exist and the database user must have privileges on it before you run either command. mysql doesn't create the database for you.

If the import is too large for phpMyAdmin

Compress the file with gzip before uploading through phpMyAdmin's Import tab. It accepts .sql.gz directly and decompresses on the fly, which usually gets you under the upload ceiling without needing SSH at all. If it's still too big, that's the point to switch to the SSH method above or open a ticket.

Restoring from a WordPress site instead

If the database belongs to a WordPress install and you just need to undo recent changes rather than restore a specific export, your site's own backup plugin or tool may be faster than the manual export/import steps above, depending on what you have set up.

When to contact support

If an import fails with a cryptic SQL error, the database user's privileges look right but access still fails, or you need a database restored from a point in time you didn't manually export, open a ticket from Support in the portal. A real person will look into it and help you figure out the options.

Common questions

Why did my database import fail with no error message?

Large files often hit PHP upload limits before phpMyAdmin finishes. Compress the file with gzip to create a .sql.gz file before uploading. If that still fails, restore it over SSH using the mysql command.

Does restoring a backup create the database for me?

No. The target database must already exist and have an assigned user with proper privileges before you restore. You can create a fresh database through MySQL Databases in the portal.

How do I back up a database that is too big to download?

Use mysqldump over SSH to export directly to a compressed gzip file. In phpMyAdmin, you can also switch to the Custom export method to exclude specific tables or export structure only.

When should I open a support ticket for database help?

Open a ticket if you encounter cryptic SQL errors, if user permissions fail, or if you need a point-in-time restore without an existing export. Support will help you review the issue and explain your options.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.