Closed (fixed)
Project:
Drush
Version:
8.x-6.x-dev
Component:
SQL
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
14 Aug 2012 at 22:29 UTC
Updated:
10 May 2013 at 02:40 UTC
Jump to comment: Most recent file
The following commands illustrate the problem:
$ cd /path/to/drupal/root && drush sql-sync @remote
- OR -
$ cd /path/to/drupal/root && drush sql-sync @remote @self
When these commands are executed, drush sql-sync does not read the 'dump-dir' option from drushrc.php.
The following line in drushrc.php has no effect, although example.drushrc.php states that it should work with sql-sync.
$options['dump-dir'] = '/path/to/dump/dir';
Current work-around is to define a site-alias for the site installed at /path/to/drupal/root, with the path-aliases set.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1730758.patch | 408 bytes | Bevan |
| #2 | 1730758.patch | 411 bytes | Bevan |
Comments
Comment #1
greg.1.anderson commentedAs a workaround, try setting $options['source-dump-dir'] and $options['target-dump-dir']. Ideally, $options['dump-dir'] would affect both, so this bug should be fixed.
Comment #2
Bevan commentedSteps to reproduce
$options['dump-dir']but not$options['source-dump-dir']or$options['target-dump-dir']in global drushrc configuration files. E.g.~/.drush/drushrc.php.dev) with%dump-dircdto a bootstrap-ible drupal site directory.drush sql-sync @dev default.--no-cacheoption. Otherwise Drush immediately notifies that "You will destroy data in %TARGET and replace...".$options['dump-dir']in drushrc and always notifies of "WARNING: Using temporary files... set '%dump' or '%dump-dir' ..."The patch
The bug is reproducible on
7.x-5.8,7.x-5.xand8.x-6.x. The attached patch applies to and fixes the bug on all those tags/branches. I am not sure if it is best applied to7.x-5.xor8.x-6.x?Comment #3
Bevan commentedThat patch broke some other uses of drush. This one fixes them. Note that this now fixes the bug for all globally configured paths retrieved via
drush_sitealias_get_path_option(), not just 'dump-dir'.Comment #4
moshe weitzman commentedComment #5
greg.1.anderson commentedCommitted to 8.x-6.x.
Comment #6
Bevan commentedThanks! :)