How to restore a large backup

26.2.2. How to restore a large backup

If your backup file is really large (a few megabytes are enough), PHP will not be able to import it in the usual CPU time limit of 30 sec. that is set by most ISPs. The result will be an error and a corrupted or incomplete table. In this case you can proceed as follows:

  • If you have access to the shell promt, login to your server with SSH and type the following on the shell prompt:

    mysql -h dbhost -u dbuname -p dbname < partial_backup.sql
    

    where dbhost, dbuname and dbname are exactly the same as in your config.php file(Section 3.7).

  • If you don't have shell access, you can use an interface like MysqlFront (see Section 28.6):

Warning The PHP CPU time limit may hit you in backups too!
 

Just as PHP may time out on a restore, it may timeout on a backup as well!. You are then left with the command line option , or some script solution along the lines of Section 27.16, modified so that it only makes a backup of a piece of your data each time.

 

Site Info v2.2.2

Last SeenLast Seen
Server TrafficServer Traffic
  • Total: 342,112,267
  • Today: 61,582
Server InfoServer Info
  • Nov 18, 2017
  • 09:08 pm PST
 
 

Daily Inspiration