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

sftp doesnt work for db pull/push #487

Closed xwulfus closed 6 years ago

xwulfus commented 6 years ago

Hi!

vagrant@site:~/www$ wordmove pull -d --debug

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

▬▬ Pulling Database ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    local | mysqldump --host=localhost --user=wordpress --password=wordpress --result-file="/www/site/public_html/wp-content/local-backup-1532341680.sql" wordpress
mysqldump: [Warning] Using a password on the command line interface can be insecure.
   remote | write public_html/wp-content/dump.php
/usr/lib/ruby/2.4.0/socket.rb:227:in `getaddrinfo': getaddrinfo: Name or service not known (SocketError)
        from /usr/lib/ruby/2.4.0/socket.rb:227:in `foreach'
        from /usr/lib/ruby/2.4.0/socket.rb:617:in `tcp'
        from /usr/lib/ruby/2.4.0/net/ftp.rb:339:in `block in open_socket'
        from /usr/lib/ruby/2.4.0/timeout.rb:76:in `timeout'
        from /usr/lib/ruby/2.4.0/net/ftp.rb:334:in `open_socket'
        from /usr/lib/ruby/2.4.0/net/ftp.rb:375:in `block in connect'
        from /usr/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
        from /usr/lib/ruby/2.4.0/net/ftp.rb:373:in `connect'
        from /usr/lib/ruby/2.4.0/net/ftp.rb:270:in `initialize'
        from /usr/lib/ruby/2.4.0/net/ftp.rb:170:in `new'
        from /usr/lib/ruby/2.4.0/net/ftp.rb:170:in `open'
        from /var/lib/gems/2.4.0/gems/photocopier-1.2.0/lib/photocopier/ftp.rb:36:in `session'
        from /var/lib/gems/2.4.0/gems/photocopier-1.2.0/lib/photocopier/ftp.rb:16:in `put_file'
        from /var/lib/gems/2.4.0/gems/photocopier-1.2.0/lib/photocopier/adapter.rb:12:in `put'
        from /var/lib/gems/2.4.0/gems/wordmove-3.1.2/lib/wordmove/deployer/ftp.rb:90:in `remote_put'
        from /var/lib/gems/2.4.0/gems/wordmove-3.1.2/lib/wordmove/deployer/ftp.rb:118:in `download_remote_db'
        from /var/lib/gems/2.4.0/gems/wordmove-3.1.2/lib/wordmove/deployer/ftp.rb:44:in `pull_db'
        from /var/lib/gems/2.4.0/gems/wordmove-3.1.2/lib/wordmove/cli.rb:79:in `block in pull'
        from /var/lib/gems/2.4.0/gems/wordmove-3.1.2/lib/wordmove/cli.rb:42:in `block in handle_options'
        from /var/lib/gems/2.4.0/gems/wordmove-3.1.2/lib/wordmove/cli.rb:41:in `each'
        from /var/lib/gems/2.4.0/gems/wordmove-3.1.2/lib/wordmove/cli.rb:41:in `handle_options'
        from /var/lib/gems/2.4.0/gems/wordmove-3.1.2/lib/wordmove/cli.rb:78:in `pull'
        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.1.2/exe/wordmove:6:in `<top (required)>'
        from /usr/local/bin/wordmove:23:in `load'
        from /usr/local/bin/wordmove:23:in `<main>'

Uploads works:

vagrant@site:~/www$ Password pull -u --debug

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

▬▬ Pulling Uploads ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
   remote | get_directory: public_html/wp-content/uploads /www/site/public_html/wp-content/uploads .git/ .gitignore .gitmodules .env node_modules/ bin/ tmp/* Gemfile* Movefile movefile movefile.yml movefile.yaml wp-config.php wp-content/*.sql.gz *.orig
    ℹ️  info | lftp -c 'set ftp:list-options -a; set cmd:fail-exit true; open sftp://user:%21Password%21@domain.com:85; find -d 1 public_html/wp-content/uploads || mkdir -p public_html/wp-content/uploads; lcd /www/site/public_html/wp-content/uploads; cd public_html/wp-content/uploads; mirror --delete --use-cache --verbose --no-perms --allow-suid --no-umask --parallel=5 --exclude-glob .git/ --exclude-glob .gitignore --exclude-glob .gitmodules --exclude-glob .env --exclude-glob node_modules/ --exclude-glob bin/ --exclude-glob tmp/* --exclude-glob Gemfile* --exclude-glob Movefile --exclude-glob movefile --exclude-glob movefile.yml --exclude-glob movefile.yaml --exclude-glob wp-config.php --exclude-glob wp-content/*.sql.gz --exclude-glob *.orig'
public_html/wp-content/uploads/      

Will be nice if it can be fixed in near time

alessandro-fazzi commented 6 years ago

Hey there,

discussion will follow in https://github.com/welaika/photocopier/issues/21, since it's not a Wordmove matter and moreover SFTP is not officially supported. Let's support it by adding some pepper to Photocopier ;)

xwulfus commented 6 years ago

Found one more problem:


vagrant@
:~/www$ wordmove pull -p

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

▬▬ Pulling Plugins ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
   remote | get_directory: /www/USER/public_html/wp-content/plugins /www/USER/public_html/wp-content/plugins .git/ .gitignore .sass-cache/ bin/ tmp/* Gemfile* Movefile* movefile* wp-config.php wp-content/*.sql
    ℹ️  info | lftp -c 'set ftp:list-options -a; set ftp:passive-mode false; set cmd:fail-exit true; open -p 22 sftp://USER:PASS@SERVER; find -d 1 /www/USER/public_html/wp-content/plugins || mkdir -p /www/USER/public_html/wp-content/plugins; lcd /www/USER/public_html/wp-content/plugins; cd /www/USER/public_html/wp-content/plugins; mirror --delete --use-cache --verbose --no-perms --allow-suid --no-umask --parallel=5 --exclude-glob .git/ --exclude-glob .gitignore --exclude-glob .sass-cache/ --exclude-glob bin/ --exclude-glob tmp/* --exclude-glob Gemfile* --exclude-glob Movefile* --exclude-glob movefile* --exclude-glob wp-config.php --exclude-glob wp-content/*.sql'
find: Fatal error: Host key verification failed            
mkdir: Fatal error: Host key verification failed