I can't restore a large database backup

Due to a limitation in cPanel it is not possible to restore a database that is larger than 2Mb in size. You may receive an error message or just a blank screen:

Fatal error: Maximum execution time of 300 seconds exceeded

If you wish to restore a database larger than 2Mb, please create a ticket to the technical support department and we will be happy to restore it for you. For more advanced users familiar with SSH please follow these instructions:

  1. Upload the database backup to the root directory of your account. The database backup is usually in .sql format. Ensure you upload the file to the absolute top level of your FTP account, your FTP program should display / and you you will see folders such as "tmp", "usr" and "var".

  2. Now connect to your account using SSH and enter the following command:

  3. mysql -u cpaneluser_mysqluser -p cpaneluser_databasename < nameofbackup.sql

    Replacing the values as follows:

    • cpaneluser - Replace with your cPanel username, this prefixes all MySQL users and database names

    • mysqluser - The is the MySQL User you wish to restore the database to

    • databasename - This is the name of database itself

    • nameofbackup.sql - Replace with the actual name of your backup file

  4. Press enter. There will be a delay while the database is restored, this will vary depending on the size of the backup.

  5. When the process is complete the command line will appear.

The database has now been restored.

Was this answer helpful?

 Print this Article

Also Read

What does the "AutoSSL certificate installed!" email mean?

A service included in your hosting package is automatic installation of basic SSL certificates...

How can I use PostgreSQL 9?

PostgreSQL 9.2 is available on some of our shared hosting servers, but not all. If you'd like to...

What is the highest CHMOD value?

For security reasons we run suPHP, this means that the highest CHMOD value available on...

I can't access cPanel

cPanel uses a secure connection and many proxy filters used in offices and schools block them. If...