PDA

View Full Version : Backup VBB3.*** không được các đồng chí ơi



hadq
05-09-2005, 05:30
Tôi muốn Backup diễn đàn VBB305 mà không được, tôi đã backup file *.sql về máy rồi, đã tham khảo một số file dùng để Backup nhưng không đuợc lỗi là thế này anh em nào biết chỉ giúp tôi với http://www.doquyha.com/diendan/phuchoi.php

Code file phuchoi.php là thế này:


<?php

$db_host = "localhost";
$db_user = "sql";
$db_pass = "thaiha";
$db_name = "msql";

$link = @mysql_connect($db_h ost, $db_user, $db_pass);

mysql_select_db($db_ name, $link);
$file="vbulletin.sql";
$ndfile = file($file);
$type="NONE";
$drop_a=array();
$table_q=array();
$data_q=array();
$tables_q=0;
echo "Xin cho doi trong giay lat...<br>";
foreach($ndfile as $line) {
$line=chop($line);
if ($type=="NONE") {
if(strtolower(substr ($line,0,6))=="insert") {
$data_q[]=substr($line,0,strl en($line)-1);
} elseif(strtolower(su bstr($line,0,6))=="create") {
$type="TABLE";
$table_q[$tables_q]=$line."\n";
} elseif(strtolower(su bstr($line,0,4))=="drop") {
$type="NONE";
array_push($drop_a, $line);
}
} elseif ($type=="TABLE") {
if(strtolower(substr ($line,0,1))==")") {
$type="NONE";
$table_q[$tables_q] .= substr($line,0,strle n($line)-1)."\n";
$tables_q++;
} else {
$table_q[$tables_q] .= $line."\n";
}
}
}
$sql_error=0;
foreach($drop_a as $q_data) {
if($q_data != "") {
$q=mysql_query($q_da ta);
if($q == 0) $sql_error=1;
}
}

foreach($table_q as $q_data) {
if($q_data != "") {
$q=mysql_query($q_da ta);
if($q == 0) $sql_error=1;
}
}

foreach($data_q as $q_data) {
if($q_data != "") {
$q=mysql_query($q_da ta);
if($q == 0) $sql_error=1;
}
}
if($sql_error==1) {
echo "Da co loi !<br>Vui long kiem tra lai.";
echo mysql_error();
} else {
echo "Chuc mung ban! Da cap nhat thanh cong.<br>\n";
echo "Cap nhat <b>".sizeof($table_q)."</b> tables , va <b>".sizeof($data_q)."</b> fields.";
}
print("<br><br><br><center>Carl Johnson</center> ");
?>

toidenroi
23-09-2005, 19:48
Bạn có thể cho biết lỗi của nó như thế nào không ? Lúc trước tôi chuyển host cũng cực khổ vì dữ liệu cũng lớn ( 50Mb dạng Gzip ). Sau đó tôi dùng bigdump để backup.

Bạn có thể tải bigdump ở đây :

http://www.ozerov.de/bigdump.php

Chúc thành công.

tinhthl
29-09-2005, 07:48
Để có bản bigdumb đã reg thì liên hệ tui hoặc post vào web:
http://www.huflit.edu.tf

addme
02-10-2005, 09:39
Bạn có thể cho biết lỗi của nó như thế nào không ? Lúc trước tôi chuyển host cũng cực khổ vì dữ liệu cũng lớn ( 50Mb dạng Gzip ). Sau đó tôi dùng bigdump để backup.

Bạn có thể tải bigdump ở đây :

http://www.ozerov.de/bigdump.php

Chúc thành công.
Cái này hay đấy