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

Production SQL backup can not be found, probably not generated #359

Closed diamondfish closed 5 years ago

diamondfish commented 7 years ago

This is a Windows-related issue.

When I run wordmove push --db --debug from my Wordpress project folder, I get the following error.

$ wordmove push --db --debug
C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-scp-1.2.1/lib/net/scp/download.rb:156:in `initialize': No such file or directory @ rb_sysopen - /cygdrive/c/www/project3/wp-content/production-backup-1482510178.sql.gz (Errno::ENOENT)
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-scp-1.2.1/lib/net/scp/download.rb:156:in `new'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-scp-1.2.1/lib/net/scp/download.rb:156:in `read_file'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-scp-1.2.1/lib/net/scp/download.rb:51:in `read_directive_state'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-scp-1.2.1/lib/net/scp.rb:369:in `block (3 levels) in start_command'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/channel.rb:320:in `call'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/channel.rb:320:in `process'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:226:in `block in preprocess'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:226:in `each'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:226:in `preprocess'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:206:in `process'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:170:in `block in loop'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:170:in `loop'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:170:in `loop'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/channel.rb:269:in `wait'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/net-scp-1.2.1/lib/net/scp.rb:321:in `download!'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/photocopier-1.1.1/lib/photocopier/ssh.rb:17:in `get'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/wordmove-2.0.0/lib/wordmove/deployer/ssh.rb:49:in `block (2 levels) in <class:SSH>'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/wordmove-2.0.0/lib/wordmove/deployer/ssh.rb:71:in `download_remote_db'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/wordmove-2.0.0/lib/wordmove/deployer/ssh.rb:18:in `push_db'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:86:in `block in push'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:37:in `block in handle_options'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:36:in `each'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:36:in `handle_options'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:85:in `push'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from C:/lib/Ruby22/lib/ruby/gems/2.2.0/gems/wordmove-2.0.0/exe/wordmove:6:in `<top (required)>'
        from C:/lib/Ruby22/bin/wordmove:22:in `load'
        from C:/lib/Ruby22/bin/wordmove:22:in `<main>'

My Movefile looks like this:

local:
  vhost: "http://project3.dev"
  wordpress_path: "/cygdrive/c/www/project3" # use an absolute path here

  database:
    name: "wp_project3"
    user: "root"
    password: "mypassword"
    host: "localhost"

production:
  vhost: "http://dev.mydomain.com"
  wordpress_path: "/myserverpath/mydomain.com/dev/" # use an absolute path here

  database:
    name: "dbname"
    user: "myusername"
    password: "mypassword"
    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: ...

ssh: ...

The ssh connection seems to be working fine. The dump.sql.gz is created, and if i run wp push --all all files seems to be copied as well. From this I take that my cygwin setup with the cygwin specific unix-like path is working well with Wordmove. Also sshpass, rsync and all other components are working as well.

The file wp-content/production-backup-1482510178.sql.gz doesn't exist locally. So I guess the creation of it fails to succeed.

What can be wrong? How can I move on with debuggning this? Have anyone experienced something similar?

Thanks in advance, and thanks for a great product which I hope to get to work on my system :)

alessandro-fazzi commented 7 years ago

Do you have gzip installed server side?

diamondfish commented 7 years ago

Yes, gzip is installed and accessable both on my local computer and the ssh-server.

112KA commented 7 years ago

I met same error. In my case, I set wrong local path in Movefile. It may just be that the path "/cygdrive/c/www/project3/wp-content/" does not exist.