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

Only some one DB table was pushed to the remote #622

Closed branecko closed 2 years ago

branecko commented 2 years ago

Describe the bug I found this repo, so I am experimenting. I have clean WP installation and mysql database running in MAMP Pro. Files are moved to remote host without problem, but there is issue with mysql 5.7 database. Only one table wp_commentmeta is moved to the remote database server. I see no errors in console.

local db: image

remote db: image

Wordmove command wordmove push --all or wordmove push -d

Expected behavior To move all tables from local db to remote databse.

movefile.yml

global:
  sql_adapter: wpcli

local:
  vhost: https://host-2:8890/
  wordpress_path: /Users/my.account.name/Sites/host2 # use an absolute path here

  database:
    name: wp_host2_db
    user: wp_host2_user
    password: "wp_host2_pw
    host: localhost
    mysqldump_options: '--socket="/Applications/MAMP/tmp/mysql/mysql.sock" --column-statistics=0'

production:
  vhost: https://mydomain.com/
  wordpress_path: /

  database:
    name: "xxxxxxxx"
    user: "xxxxxxxxxx"
    password: "xxxxxxxxxxxx"
    host: "mysql80.r1.xxxxxxxxxxx"

  exclude:
    - '.git/'
    - '.gitignore'
    - '.gitmodules'
    - '.env'
    - 'node_modules/'
    - 'bin/'
    - 'tmp/*'
    - 'Gemfile*'
    - 'Movefile'
    - 'movefile'
    - 'movefile.yml'
    - 'movefile.yaml'
    - 'wp-config.php'
    - 'wp-content/*.sql.gz'
    - '*.orig'

  ftp:
    user: mydomain.com
    password: xxxxxxx
    host: mydomain.com
    port: 22
    scheme: sftp

Exception/trace

$ wordmove push -d

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

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

   remote | write [secret]wp-content[secret]dump.php

    local | download [secret]wp-content[secret]dump.php?shared_key=22cfe08610440d037aeb4410882a01c1c4803966c1adf703e826ff36b716271e3719a3abcacd5ea3 > [secret][secret]wp-content[secret]remote-backup-1635178078.sql

   remote | delete: [secret]wp-content[secret]dump.php

   remote | delete: [secret]wp-content[secret]dump.mysql

    local | mysqldump --host=[secret] --user=wp_host2_user --password=[secret] --result-file="[secret][secret]wp-content[secret]dump.sql" --socket=[secret]Applications[secret]MAMP[secret]tmp[secret]mysql[secret]mysql.sock --column-statistics=0 wp_host2_db
mysqldump: [Warning] Using a password on the command line interface can be insecure.

    local | Adapt dump

   remote | copying [secret][secret]wp-content[secret]dump.sql to [secret]wp-content[secret]dump.sql

   remote | write [secret]wp-content[secret]import.php

    local | download [secret]wp-content[secret]import.php?shared_key=1e39ad25e7cddcbab6814df9f0dc1ccf46347a8622a03a0415709676a876084bb84f8aeab4d437c1&start=1&foffset=0&totalqueries=0&fn=dump.sql > [secret][secret]wp-content[secret]log.html

    local | delete: '[secret][secret]wp-content[secret]log.html'

   remote | delete: [secret]wp-content[secret]import.php

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

    local | delete: '[secret][secret]wp-content[secret]dump.sql'

Environment (please complete the following information):

Doctor

(If it is not, report the error you got.)

alessandro-fazzi commented 2 years ago

The more I try to think about this, the more I get confused. I literally have no clue on what could be happening there.

This is old, battle tested software, thus it is just impossible that this could be a "general" bug in the export/import procedure, but something related to a specific scenario. I can't get where this specificity could be, BTW.

The only thing I can think about is to double check the output of manually running the command

mysqldump --host=localhost --user=wp_host2_user --password=YOURPWD --result-file="/some/path/dump.sql" --socket=/Applications/MAMP/tmp/mysql/mysql.sock --column-statistics=0 wp_host2_db

opening with an editor the dump located at /some/path/dump.sql and be sure there are all the expected tables in it.

If you have all the expected tables, then I wouldn't have an explanation about the partial import happening.

alessandro-fazzi commented 2 years ago

Sorry, but without any feedback I'll let this one to the stale bot removing the "bug" label.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.