Snapshot restore fail with error

I've tried to restore a site tonight - with the one snapshot I have.

When I attempted a restore with Plugins off, the error message I received was:

Unknown: errno:2 mysql_query(): Unable to save result set /home1/xxxxxxx/public_html/xxxxxxx/wp-includes/wp-db.php on line 1095

I'd love to understand whether this looks like an issue with MYSQL, becuase my hosting company has been having problems with the database server today.

Any light you can shed on this would be perfect.


  • Paul


    From the error you provided it is not easy to determine the source of the error. That wp-db.php is the main interface between all WordPress database interactions and your MySQL database system.

    From the PHP code of the wp-db.php this is related to the 'SAVEQUERIES' option you may have setup in your wp-config.php You can read more about SAVEQUERIES via the WordPress Codex

    On a restore the Snapshot plugin basically just reloads the database tables by table. During the initial backup Snapshot creates a zip file which will contain a file with the extension .sql for each of your database tables.

    This may be something related to your hosting as you mentioned.

    I visited the site and it does appear to be up. So wondering if you are just hunting for answer to the error or if you are still needing to perform the restore. Many times if the restore fails it leave the site half restored and is pretty much unusable.

    Let us know if you need further assistance.

  • Rheinard

    Hi @jameswilliams90,

    You might also hit execution limits when performing a restore. You can try to increase these limits using one of the following methods.

    Add to theme's functions.php at the top.

    @ini_set( 'upload_max_size' , '100M' );
    @ini_set( 'post_max_size', '100M');
    @ini_set( 'max_execution_time', '300' );

    php.ini (in your site's root folder, change php.ini with these values, if php.ini does not exist, you can create it in your site's root)

    upload_max_filesize = 100M
    post_max_size = 100M
    max_execution_time = 300

    .htaccess (if running on Apache)

    php_value upload_max_filesize 100M
    php_value post_max_size 100M
    php_value max_execution_time 300
    php_value max_input_time 300

    Let us know if increasing your limits is solving your issue.


    Edit: Only just saw the date of the original post. How did this end up in my task? :wink:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.