Skip to content

Remote drush commands not exporting to file using > #4004

@omarlopesino

Description

@omarlopesino

Describe the bug
After upgrading from drush 9.5.2 to drush 9.6.0 the drush sql-dump command does not dump the output to a file, running the command from the

To Reproduce
What did you do?

drush @remote.stg sql:dump > tmp/db.sql

Expected behavior
The file tmp/db.sql should have all the database dumped.

Actual behavior
The file tmp/db.sql is empty.

Workaround
Is there another way to do the desired action?
Make the action in two steps:

drush @remote.stg sql-dump --target-file=<targetfile>
drush rsync @remote.stg:<targetfile> tmp/db.sql

System Configuration

Q A
Drush version? 9.6.0
Drupal version? 8.6.12
PHP version 7.1.17-
OS? Ubuntu 17.10

Remote environment os:
Linux **** 3.16.0-5-amd64 #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08) x86_64 GNU/Linux

Drush alias

stg:
  uri: 'host.domain'
  root: '/path/to/codebase'
  host: 'host.domain'
  user: 'remote-user'
  command:
    sql:
      sync:
        options:
          structure-tables-list: 'cache*,session,watchdog'
    dump:
      sync:
        options:
          structure-tables-list: 'cache*,session,watchdog'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions