Snapshot is broken
-
Hello, I just installed the plugin and it seems to run fine taking a first snapshot of my website. But when I click on the restore option I read “Snapshot is broken”. I am afraid to restore this backup. Any solution available ? Thanks!
-
Hi there!
Can you run the command from the terminal like
wp snapshot backup
This should throw an error if there’s a problem!
Hello, I did a test from the command line and here are the results. I am using PHP 8.21
PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\CompositeCommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\CompositeCommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 PHP Deprecated: Creation of dynamic property WP_CLI\Dispatcher\Subcommand::$longdesc is deprecated in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php on line 38 mysqldump: Got error: 2002: "Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)" when trying to connect
Please update your WP CLI to the latest version to support PHP 8.2:
wp cli update
Are you running Local WP?
If so you have to set the location for your socket inside the
DB_HOST
constant in your wp-config.php:if ( defined( 'WP_CLI' ) && WP_CLI ) { define( 'DB_HOST', 'localhost:[PATHTOMYSQL]mysqld.sock' ); }
Running Local on MAC makes the path looks like this:
'localhost:/Users/[USERNAME]/Library/Application Support/Local/run/[SITE_IDENTIFIER]/mysql/mysqld.sock'
Hope that helps!
I updated wp cli to the latest version and then tried again.
Still same error. The snapshot is created but the descriptions changes into “snapshot is broken”
I am using a Contabo VPS running Ubuntu 20.04
Are you able to run a DB command like
wp db query "SHOW TABLES"
Technically snapshots must be able to run
mysqldumb
to workI ran the db query command and indeed I receive the following error:
Error: Failed to get current SQL modes. Reason: ERROR 2002 (HY000): Can’t connect to local server through socket ‘/run/mysqld/mysqld.sock’ (2)
My websites are running fine so what could be the cause of this error ?
Thanks
The issue is not really related to Snapshots but your WP CLI setup. Please search Google for this error message in combination with your server to find a solution.
Once you can query db tables Snapshots should work as well!
Hi, I finally solved the problem. I have changed my database settings in wp-config.php from localhost to 127.0.0.1. Everything seems to work fine now. Thanks for your assistance!
- This reply was modified 1 year, 1 month ago by djek.
- The topic ‘Snapshot is broken’ is closed to new replies.