welaika / wordmove

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

pushing problems #615

Closed ThSeyfarth closed 3 years ago

ThSeyfarth commented 3 years ago

Hello Guys there, i even set up wordmove to my second system. Now i´d like to push the database to the Main-System. Following Command i use:

wordmove push -e live -d -v

The Pushing-Process does start but a few Moments later i got this error Message.

Using Movefile: ./movefile.yml ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Pushing Database ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

remote | mysqldump --host=[secret] --port=24482 --user=root --password=[secret] --result-file="[secret]/wp-content/dump.sql" wordpress

remote | gzip -9 -f "[secret]/wp-content/dump.sql"

remote | get: [secret]/wp-content/dump.sql.gz [secret]/wp-content/live-backup-1618310956.sql.gz

remote | delete: [secret]/wp-content/dump.sql.gz

local | mysqldump --host=[secret] --user=wptmpuser --password=[secret] --result-file="[secret]/wp-content/dump.sql" wordpress

local | adapt dump for vhost

Error: YIKES! It looks like you're running this as root. You probably meant to run this as the user that your WordPress installation exists under.

If you REALLY mean to run this as root, we won't stop you, but just bear in mind that any code on this site will then have full control of your server, making it quite DANGEROUS.

If you'd like to continue as root, please run this again, adding this flag: --allow-root

If you'd like to run it as the user that this site is under, you can run the following to become the respective user:

sudo -u USER -i -- wp <command>

Traceback (most recent call last): 19: from /root/.rbenv/versions/2.6.1/bin/wordmove:23:in <main>' 18: from /root/.rbenv/versions/2.6.1/bin/wordmove:23:inload' 17: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/exe/wordmove:6:in <top (required)>' 16: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:instart' 15: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in dispatch' 14: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:ininvoke_command' 13: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in run' 12: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:115:inpush' 11: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:39:in handle_options' 10: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:39:ineach' 9: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:40:in `block in handle_options'

8: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:116:in block in push' 7: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/deployer/ssh.rb:38:inpush_db'

6: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:11:in `adapt_local_db!'

5: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:50:in `wpcli_search_replace'

4: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/sql_adapter/wpcli.rb:19:in `command'

3: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/sql_adapter/wpcli.rb:38:in `cli_config_path'

2: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/wordmove-5.2.1/lib/wordmove/sql_adapter/wpcli.rb:49:in `load_from_cli'

1: from /root/.rbenv/versions/2.6.1/lib/ruby/2.6.0/json/common.rb:156:in `parse'

/root/.rbenv/versions/2.6.1/lib/ruby/2.6.0/json/common.rb:156:in `parse': 767: unexpected token at '' (JSON::ParserError)

Dunno how to fix this Error. Spend even some Time to find a solution but without any success.

ThSeyfarth commented 3 years ago

....in Addition what you might be need to know. The connection to the destination Host is successfully and there will be moved a dump.sql and created the dump.sql.gz with für user its logged via ssh. But then will these files deleted at dest Host and für error growns Up.

ThSeyfarth commented 3 years ago

Probably it helps to see what i am doing wrong, here my movefile:

global: sql_adapter: wpcli

local: vhost: https://wpdev.live-website.com wordpress_path: /var/www/html

database: name: wordpress user: wptmpuser password: pa$$wd host: localhost charset: utf-8

live: vhost: https://live-website.com wordpress_path: /var/www/html

database: host: 12.34.56.78 name: wordpress user: root password: pa$$wd port: 45678

mysqldump_options: --max_allowed_packet=1G # Only available if using SSH

mysql_options: --protocol=TCP

exclude:

ThSeyfarth commented 3 years ago

I close thie Issue solved the Problem