Under drush 7.x-4.5, the following command worked well for backing up the site database:

drush @site sql-dump --result-file --gzip

where @site was defined in .drush/aliases.drushrc.php as:

$aliases['site'] = array(
    'uri' => 'example.com',
    'root' => '/var/www/html/drupal',
  );

After replacing drush 7.x-4.5 with drush 7.x-5.0, an error occurred after running the above command:

[user@example.com ~]$ drush @site sql-dump --result-file --gzip
Unknown engine type version-control                                  [error]
No path was set for including the version-control engine backup.     [error]
PHP Fatal error:  Call to a member function prepare_backup_dir() on a non-object in /home/example.com/drush/commands/sql/sql.drush.inc on line 345
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Call to a member function prepare_backup_dir() on a non-object
in /home/example.com/drush/commands/sql/sql.drush.inc, line 345

Any ideas?

Comments

davidd07’s picture

I am also getting the same thing happening.

davidd07’s picture

Ok will point out it works when you enter a file name. eg drush @local sql-dump --result-file=test.sql However the automatic file name method seems to be no longer working.

simon_s’s picture

The automatic file name method was quite handy. Please repair. :)

DamienMcKenna’s picture

I got this error when I forgot to enter an equals sign between the "--result-file" argument and the filename, which suggests a bug in the logic controlling the --result-file argument.

moshe weitzman’s picture

Status: Active » Fixed

Fixed in 0fefe87. Underscore instead of dash

waverate’s picture

Moshe,

Thank you for looking into this. How do we find the patch?

moshe weitzman’s picture

Sorry, my push had failed. It is pushed now. You can download latest from git or grab patch from http://drupalcode.org/project/drush.git

waverate’s picture

Confirmed fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.