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

pulling database not working #380

Closed mayank-finland closed 7 years ago

mayank-finland commented 7 years ago

Please see the error below.

    local | mysqldump --host=localhost --user=root --password=root --result-file="/Applications/MAMP/htdocs/StandupCC/wp-content/local-backup-1490877475.sql" ssuc
sh: mysqldump: command not found
/Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/wordmove-2.0.0/lib/wordmove/deployer/base.rb:132:in `run': Return code reports an error (Wordmove::ShellCommandError)
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/wordmove-2.0.0/lib/wordmove/deployer/base.rb:232:in `save_local_db'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/wordmove-2.0.0/lib/wordmove/deployer/ssh.rb:34:in `pull_db'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/wordmove-2.0.0/lib/wordmove/cli.rb:69:in `block in pull'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/wordmove-2.0.0/lib/wordmove/cli.rb:37:in `block in handle_options'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/wordmove-2.0.0/lib/wordmove/cli.rb:36:in `each'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/wordmove-2.0.0/lib/wordmove/cli.rb:36:in `handle_options'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/wordmove-2.0.0/lib/wordmove/cli.rb:68:in `pull'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/gems/wordmove-2.0.0/exe/wordmove:6:in `<top (required)>'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/bin/wordmove:22:in `load'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/bin/wordmove:22:in `<main>'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `eval'
    from /Users/mayankjain/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `<main>'

Am I missing anything?

My movefile is below

local:
  vhost: "http://localhost:8888/..."
  wordpress_path: "/Applications/MAMP/htdocs/..." # use an absolute path here

  database:
    name: "xxxx"
    user: "xxxx"
    password: "xxxx"
    host: "localhost"

production:
  vhost: "https://xxxx...i"
  wordpress_path: "/home/xxxx/public_html" # use an absolute path here

  database:
    name: "xxxxxxxx"
    user: "xxxxxxxx"
    password: "xxxx"
    host: "localhost"
    # port: "3308" # Use just in case you have exotic server config
    # mysqldump_options: "--max_allowed_packet=1G" # Only available if using SSH

  exclude:
    - ".git/"
    - ".gitignore"
    - ".sass-cache/"
    - "node_modules/"
    - "bin/"
    - "tmp/*"
    - "Gemfile*"
    - "Movefile"
    - "wp-config.php"
    - "wp-content/*.sql"

  paths: # you can customize wordpress internal paths
    wp_content: "wp-content"
    uploads: "wp-content/uploads"
    plugins: "wp-content/plugins/xxxx"
    themes: "wp-content/themes/xxxx"
    languages: "wp-content/languages"

  ssh:
    host: "..."
    user: "xxxx"
    #password: "*xxxxxxxxxx" # password is optional, will use public keys if available.
    port: "18765" # Port is optional
    rsync_options: "--verbose" # Additional rsync options, optional
    gateway: # Gateway is optional
    #host: "host"
    #user: "user"
    #password: "password" # password is optional, will use public keys if available.

staging: 
  vhost: "https://..."
  wordpress_path: "/home/xxxx/staging/2/" # use an absolute path here

  database:
    name: "xxxx"
    user: "xxxx"
    password: "xxxxxxxx"
    host: "localhost"
    # port: "3308" # Use just in case you have exotic server config
    # mysqldump_options: "--max_allowed_packet=1G" # Only available if using SSH

  exclude:
    - ".git/"
    - ".gitignore"
    - ".sass-cache/"
    - "node_modules/"
    - "bin/"
    - "tmp/*"
    - "Gemfile*"
    - "Movefile"
    - "wp-config.php"
    - "wp-content/*.sql"

  paths: # you can customize wordpress internal paths
    wp_content: "wp-content"
    uploads: "wp-content/uploads"
    plugins: "wp-content/plugins/xxxx"
    themes: "wp-content/themes/xxxx"
    languages: "wp-content/languages"
alessandro-fazzi commented 7 years ago

You have not mysqldump command in your $PATH. You are using MAMP as far as I can see, so you should read this docs

Cheers