welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 165 forks source link

DB push error on remote #466

Closed ghost closed 6 years ago

ghost commented 6 years ago

After some experimenting, I managed to push all the files other than DB to my remote location, please refer to log below. I am using wordmove v3.0.2, gem v.2.6.14.1 and ruby v2.4.4


▬▬ Pushing Database ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
   remote | mysqldump --host=localhost --user=xxxxxxx --password=xxxxxx --result-file="/var/www/3oclock.gq/htdocs/wp-content/dump.sql" 3oclock_gq
gzip --best --force "/var/www/xxxxx.xx/htdocs/wp-content/dump.sql"
   remote | gzip --best --force "/var/www/3oclock.gq/htdocs/wp-content/dump.sql"
   remote | get: /var/www/3oclock.gq/htdocs/wp-content/dump.sql.gz /var/www/sandbox.local/htdocs/wp-content/production-backup-1523848694.sql.gz
   remote | delete: /var/www/3oclock.gq/htdocs/wp-content/dump.sql.gz
    local | mysqldump --host=localhost --user=xxxxx --password=xxxxx--result-file="/var/www/sandbox.local/htdocs/wp-content/dump.sql" sandbox_local
    local | adapt dump for vhost
    local | wp search-replace http://xxxxx.xx http://xxxxx.xx --quiet --skip-columns=guid --all-tables --allow-root
Error: This does not seem to be a WordPress install.
Pass --path=`path/to/wordpress` or run `wp core download`.
/var/lib/gems/2.4.0/gems/wordmove-3.0.2/lib/wordmove/deployer/base.rb:107:in `run': Return code reports an error (Wordmove::ShellCommandError)
        from /var/lib/gems/2.4.0/gems/wordmove-3.0.2/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:11:in `adapt_local_db!'
        from /var/lib/gems/2.4.0/gems/wordmove-3.0.2/lib/wordmove/deployer/ssh.rb:36:in `push_db'
        from /var/lib/gems/2.4.0/gems/wordmove-3.0.2/lib/wordmove/cli.rb:103:in `block in push'
        from /var/lib/gems/2.4.0/gems/wordmove-3.0.2/lib/wordmove/cli.rb:42:in `block in handle_options'
        from /var/lib/gems/2.4.0/gems/wordmove-3.0.2/lib/wordmove/cli.rb:41:in `each'
        from /var/lib/gems/2.4.0/gems/wordmove-3.0.2/lib/wordmove/cli.rb:41:in `handle_options'
        from /var/lib/gems/2.4.0/gems/wordmove-3.0.2/lib/wordmove/cli.rb:102:in `push'
        from /var/lib/gems/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from /var/lib/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/lib/gems/2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from /var/lib/gems/2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from /var/lib/gems/2.4.0/gems/wordmove-3.0.2/exe/wordmove:6:in `<top (required)>'
        from /usr/local/bin/wordmove:23:in `load'
        from /usr/local/bin/wordmove:23:in `<main>'
alessandro-fazzi commented 6 years ago

Hi,

does the command wp search-replace http://xxxxx.xx http://xxxxx.xx --quiet --skip-columns=guid --all-tables --allow-root work itself? Please, be sure to backup your data before to try launching the command.

Does wordmove doctor say something about wp-cli?

EDIT: are you invoking wordmove within the project dirtree?

ghost commented 6 years ago

Will update you when I have my server backup, sorta trashed the server when trying another solution

EDIT: are you invoking wordmove within the project dirtree? Yes, if you mean the htdocs/public folder/wordpress folder I assume?

ghost commented 6 years ago

Found the error, it is my mistake. I did invoked the wordmove at the wrong directory, used to do this with older version of wordmove that I have in another environment.