pilch73 wrote:yep but doesnt seem right
That's because your dump is too large to do that way
Here's what you should do:
0. (I forgot to add this before ) Install a fresh copy of PunBB
1. Upload the dump to the fresh copy's website in the plugins folder. Call it backup.sql
2. Download the DB Management plugin
3. Open the code up, find
elseif ( isset($_POST['restore_start']) ) {
// Restore SQL Dump
//
// Handle the file upload ....
// If no file was uploaded report an error...
//
$backup_file_name = (!empty($HTTP_POST_FILES['backup_file']['name'])) ? $HTTP_POST_FILES['backup_file']['name'] : "";
$backup_file_tmpname = ($HTTP_POST_FILES['backup_file']['tmp_name'] != "none") ? $HTTP_POST_FILES['backup_file']['tmp_name'] : "";
$backup_file_type = (!empty($HTTP_POST_FILES['backup_file']['type'])) ? $HTTP_POST_FILES['backup_file']['type'] : "";
if($backup_file_tmpname == "" || $backup_file_name == "")
{
message('No file was uploaed or the upload failed, the database was not restored');
}
if( preg_match("/^(text\/[a-zA-Z]+)|(application\/(x\-)?gzip(\-compressed)?)|(application\/octet-stream)$/is", $backup_file_type) )
{
if( preg_match("/\.gz$/is",$backup_file_name) )
{
$do_gzip_compress = FALSE;
$phpver = phpversion();
if($phpver >= "4.0")
{
if(extension_loaded("zlib"))
{
$do_gzip_compress = TRUE;
}
}
if($do_gzip_compress)
{
$gz_ptr = gzopen($backup_file_tmpname, 'rb');
$sql_query = "";
while( !gzeof($gz_ptr) )
{
$sql_query .= gzgets($gz_ptr, 100000);
}
}
else
{
message('Sorry the database could not be restored');
}
}
else
{
$sql_query = fread(fopen($backup_file_tmpname, 'r'), filesize($backup_file_tmpname));
}
}
else
{
message('Error the file name or file format caused an error, the database was not restored');
}
Replace with
elseif ( isset($_POST['restore_start']) ) {
$sql_query = fread(fopen('backup.sql', 'r'), filesize('backup.sql'));
3. Upload the plugin, go to the plugin's page and hit the Restore button. It might take a while, but it should restore