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

Using Python 2.6

The default version of Python installed is 2.4, however version 2.6 is also available. To use...

Some commands or files are missing in SSH (or the mysql command-line client won't connect)

Sometimes when you log into SSH, you might notice that some commands or files (such as the error...

Email Hourly Limit

If you have sent a mass email (mailing list etc) and had emails returned with a message that your...

What is the path to Perl?

Easy! /usr/bin/perl

Error Log

We have disabled the error log function in cPanel because it contains a quirk that causes it not...