MyBB Community Forums

Full Version: Is repair possible of damaged .sql Backup File ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Looks like there's nothing wrong with it.
destroyer Wrote:Looks like there's nothing wrong with it.

OK thanks, - have you any idea how I then can use the file to retore the forum.
Is there another way to restore than via phpMyAdmin ?
- or any other way to use the backup-file to restore the site to avoid the 'syntax error' halt of the restore process ?

Regards
Edward Wahl
edwahl Wrote:Can the backup file (web109938.sql) in any way be repaired so the site can be restored ?
No. Apparently phpMyAdmin encountered an error while exporting the database, so your backup file is incomplete.

#2013 - Lost connection to MySQL server during query
destroyer Wrote:Looks like there's nothing wrong with it.
Look harder! Toungue
Weird. Toungue

Are you sure there isn't a workaround, WDZ? Maybe using empty tables for the missing ones, and importing the data that has been saved with the backup?
NOTHING WRONG WITH IT????

Are you insane? The reason it only restores 2 tables is because there are only two tables in the SQL file!

Look at the following:

[b]INSERT INTO `mybb_adminlog` VALUES (1, 1152178434, 'forums.php', 'modify', '', '80.161.62.45');[/b]
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /usr/home/shared/domains/sqladminxx.talkactive.net/export.php:120) in <b>/usr/home/shared/domains/sqladminxx.talkactive.net/libraries/header_http.inc.php</b> on line <b>14</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /usr/home/shared/domains/sqladminxx.talkactive.net/export.php:120) in <b>/usr/home/shared/domains/sqladminxx.talkactive.net/libraries/header_http.inc.php</b> on line <b>15</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /usr/home/shared/domains/sqladminxx.talkactive.net/export.php:120) in <b>/usr/home/shared/domains/sqladminxx.talkactive.net/libraries/header_http.inc.php</b> on line <b>16</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /usr/home/shared/domains/sqladminxx.talkactive.net/export.php:120) in <b>/usr/home/shared/domains/sqladminxx.talkactive.net/libraries/header_http.inc.php</b> on line <b>17</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /usr/home/shared/domains/sqladminxx.talkactive.net/export.php:120) in <b>/usr/home/shared/domains/sqladminxx.talkactive.net/libraries/header_http.inc.php</b> on line <b>20</b><br />
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">

<head>
<title>phpMyAdmin</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="http://195.128.174.34/" />
<script language="JavaScript" type="text/javascript">
<!--
    /* added 2004-06-10 by Michael Keck
     *       we need this for Backwards-Compatibility and resolving problems
     *       with non DOM browsers, which may have problems with css 2 (like NC 4)
    */
    var isDOM      = (typeof(document.getElementsByTagName) != 'undefined'
                      && typeof(document.createElement) != 'undefined')
                   ? 1 : 0;
    var isIE4      = (typeof(document.all) != 'undefined'
                      && parseInt(navigator.appVersion) >= 4)
                   ? 1 : 0;
    var isNS4      = (typeof(document.layers) != 'undefined')
                   ? 1 : 0;
    var capable    = (isDOM || isIE4 || isNS4)
                   ? 1 : 0;
    // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
    if (capable) {
        if (typeof(window.opera) != 'undefined') {
            var browserName = ' ' + navigator.userAgent.toLowerCase();
            if ((browserName.indexOf('konqueror 7') == 0)) {
                capable = 0;
            }
        } else if (typeof(navigator.userAgent) != 'undefined') {
            var browserName = ' ' + navigator.userAgent.toLowerCase();
            if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
                capable = 0;
            }
        } // end if... else if...
    } // end if
    document.writeln('<link rel="stylesheet" type="text/css" href="./css/phpmyadmin.css.php?lang=en-utf-8&amp;js_frame=right&amp;js_isDOM=' + isDOM + '" />');
//-->
</script>
<noscript>
    <link rel="stylesheet" type="text/css" href="./css/phpmyadmin.css.php?lang=en-utf-8&amp;js_frame=right" />
</noscript>
    <script type="text/javascript" language="javascript">
    <!--
    // Updates the title of the frameset if possible (ns4 does not allow this)
    if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
        && typeof(parent.document.title) == 'string') {
        parent.document.title = '195.128.174.34 >> 127.0.0.1 >> web109938  >> mybb_adminoptions | phpMyAdmin 2.6.1-pl2';
    }
    
    //-->
    </script>
        
        <meta name="OBGZip" content="false" />
    </head>


        <body bgcolor="#F5F5F5">
    <table border="0" cellpadding="0" cellspacing="0" id="serverinfo">
    <tr>
        <td class="serverinfo">Server:&nbsp;<a href="main.php?lang=en-utf-8&amp;server=1&amp;collation_connection=utf8_general_ci"><img src="./themes/original/img/s_host.png" width="16" height="16" border="0" alt="195.128.174.34" />195.128.174.34</a>
</td>

        <td class="serverinfo"><div></div></td>
            <td class="serverinfo">Database:&nbsp;<a href="db_details_structure.php?lang=en-utf-8&amp;server=1&amp;collation_connection=utf8_general_ci&amp;db=web109938"><img src="./themes/original/img/s_db.png" width="16" height="16" border="0" alt="web109938" />web109938</a>
</td>

        <td class="serverinfo"><div></div></td>
            <td class="serverinfo">Table:&nbsp;<a href="tbl_properties_structure.php?lang=en-utf-8&amp;server=1&amp;collation_connection=utf8_general_ci&amp;db=web109938&amp;table=mybb_adminoptions"><img src="./themes/original/img/s_tbl.png" width="16" height="16" border="0" alt="mybb_adminoptions" />mybb_adminoptions</a>
</td>

    </tr>
</table>
<!-- PMA-SQL-ERROR -->
    <table border="0" cellpadding="2" cellspacing="1">        <tr>
            <th class="tblHeadError"><div class="errorhead">Error</div></th>
        </tr>
        <tr>
            <td><div class="tblWarn"><p>
    <b>SQL-query:</b>
<a href="tbl_properties.php?lang=en-utf-8&amp;server=1&amp;collation_connection=utf8_general_ci&amp;db=web109938&amp;table=mybb_adminoptions&amp;sql_query=SHOW+TABLE+STATUS+FROM+%60web109938%60+LIKE+%27mybb_adminoptions%27&amp;show_query=1"><img src=" ./themes/original/img/b_edit.png" width="16" height="16" border="0" hspace="2" align="middle" alt="Edit" /></a></p>
<p>
    <span class="syntax"><span class="syntax_alpha syntax_alpha_reservedWord">SHOW</span>  <span class="syntax_alpha syntax_alpha_reservedWord">TABLE</span>  <span class="syntax_alpha syntax_alpha_reservedWord">STATUS</span>  <span class="syntax_alpha syntax_alpha_reservedWord">FROM</span>  <span class="syntax_quote syntax_quote_backtick">`web109938`</span>  <span class="syntax_alpha syntax_alpha_reservedWord">LIKE</span>  <span class="syntax_quote syntax_quote_single">'mybb_adminoptions'</span></span>
</p></div>
<div class="tblWarn"><p>
    <b>MySQL said: </b><a href="http://dev.mysql.com/doc/mysql/en/Error-returns.html" target="mysql_doc"><img src="./themes/original/img/b_help.png" width="11" height="11" border="0" alt="Documentation" title="Documentation" hspace="2" align="middle" /></a>
</p>
<code>
#2013 - Lost connection to MySQL server during query
</code><br />
</div>            </td>
        </tr>
    </table>


<script type="text/javascript">
<!--

    function reload_querywindow () {
        if (parent.frames.queryframe && parent.frames.queryframe.querywindow && !parent.frames.queryframe.querywindow.closed && parent.frames.queryframe.querywindow.location) {
                        // no submit, query was invalid
                    }
    }

    function focus_querywindow(sql_query) {
        if (parent.frames.queryframe && parent.frames.queryframe.querywindow && !parent.frames.queryframe.querywindow.closed && parent.frames.queryframe.querywindow.location) {
            if (parent.frames.queryframe.querywindow.document.querywindow.querydisplay_tab != 'sql') {
                parent.frames.queryframe.querywindow.document.querywindow.querydisplay_tab.value = "sql";
                parent.frames.queryframe.querywindow.document.querywindow.query_history_latest.value = sql_query;
                parent.frames.queryframe.querywindow.document.querywindow.submit();
                parent.frames.queryframe.querywindow.focus();
            } else {
                parent.frames.queryframe.querywindow.focus();
            }

            return false;
        } else if (parent.frames.queryframe) {
            new_win_url = 'querywindow.php?sql_query=' + sql_query + '&lang=en-utf-8&server=1&collation_connection=utf8_general_ci&db=web109938&table=mybb_adminoptions';
            parent.frames.queryframe.querywindow=window.open(new_win_url, '','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=550,height=310');

            if (!parent.frames.queryframe.querywindow.opener) {
               parent.frames.queryframe.querywindow.opener = parent.frames.queryframe;
            }

            // reload_querywindow();
            return false;
        }
    }

    reload_querywindow();

//-->
</script>


</body>

</html>
The bolder bit is the last SQL code in the file, and then it turns to HTML....