When I try to do a development to live sql-sync I get this error "Error: no database record could be found for" Can any one put some light on as to way?

Here is the output:
Gareth-MacBook:~ garethhall$ drush sql-sync @dev.tetoki @tetkoki --source-dump sqldump.sql -v -d
Bootstrap to phase 0. [0.04 sec, 1.3 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.04 sec, 1.43 MB] [bootstrap]
Bootstrap to phase 0. [0.12 sec, 3.51 MB] [bootstrap]
Found command: sql-sync (commandfile=sql) [0.12 sec, 3.51 MB] [bootstrap]
Initializing drush commandfile: drush_make [0.12 sec, 3.51 MB] [bootstrap]
Initializing drush commandfile: drush_make_d_o [0.12 sec, 3.51 MB] [bootstrap]
Initializing drush commandfile: user [0.12 sec, 3.51 MB] [bootstrap]
Including /usr/local/lib/drush/commands/sql/sync.sql.inc [0.12 sec, 3.52 MB] [bootstrap]
Calling drush command init function: drush_sql_sync_init [0.13 sec, 3.65 MB] [bootstrap]
Load alias @tetkoki [0.13 sec, 3.66 MB] [notice]
Load alias @dev.tetoki [0.13 sec, 3.66 MB] [notice]
Load alias @tetkoki [0.13 sec, 3.66 MB] [notice]
Running: /usr/local/lib/drush/drush.php --all --root='/Users/garethhall/Sites/tetokiretreat.co.nz/public_html' [command]
--uri='dev.tetokiretreat.co.nz' sql-conf --backend [0.14 sec, 3.66 MB]
Load alias @tetkoki [0.43 sec, 3.68 MB] [notice]
Error: no database record could be found for @tetkoki [0.43 sec, 3.68 MB] [error]
Command dispatch complete [0.43 sec, 3.65 MB] [notice]
Peak memory usage was 3.73 MB [0.44 sec, 3.65 MB]

This is the status

Gareth-MacBook:~ garethhall$ drush @tetoki status
Drupal version : 7.0
Site URI : stage.tetokiretreat.co.nz
Database driver : mysql
Database hostname : localhost
Database username : *********
Database name : ********
Database : Connected
Drupal bootstrap : Successful
Drupal user : Anonymous
Default theme : tetoki
Administration theme : seven
PHP configuration : /usr/local/lib/php.ini
Drush version : 4.2
Drush configuration :
Drush alias files :
Drupal root : /home/tetokiretr/public_html/stage
Site path : sites/default
File directory path : sites/default/files

I am able to do a live to development sql-sync with out a problem but why do I have to include the extra options?
This works
drush sql-sync @tetoki @dev.tetoki --source-dump sqldump.sql
This does not
drush sql-sync @tetoki @dev.tetoki

CommentFileSizeAuthor
#18 aliases.drushrc.php_.txt669 byteswOOge

Comments

greg.1.anderson’s picture

Status: Active » Postponed (maintainer needs more info)

It seems that drush is having trouble making callbacks to itself, or perhaps the dev site just isn't set up correctly. If you are trying to set up the site for the first time, call with --create-db to set up the database. Make sure that the first time you call drush rsync, you use the flag --include-conf to copy settings.php over. Then customize settings.php so that your dev site will use a different database than the live site (not necessary if they are on different machines, of course).

Once you've done that, try:

drush @dev.tetoki status

and

drush @dev.tetoki sql-conf --all

If the later works, sql-sync should work too.

garethhallnz’s picture

Hi Thanks for the help so far. Obviously the development @dev.tetoki is up and running perfectly, the @tetoki is also running but I used other methods to publish it. I thought it best I list how things are setup.

My aliases.drushrc.php

<?php
$aliases['default'] = array(
	'path-aliases' => array(
		'%files' => 'sites/default/files',
		'%dump' => '/Users/garethhall/tmp/sync-dump.sql',
	),
);
/*** tetokiretreat.co.nz ***/
$aliases['dev.tetoki'] = array (
  'root' => '/Users/garethhall/Sites/tetokiretreat.co.nz/public_html',
  'uri' => 'dev.tetokiretreat.co.nz',
);
$aliases['tetoki'] = array (
  'uri' => 'stage.tetokiretreat.co.nz',
  'root' => '/home/tetokiretr/public_html/stage',            
  'remote-host' => '113.21.225.179',
  'remote-user' => '***********',
);
?>

Doing drush command: drush @dev.tetoki status

Drupal version : 7.0
Site URI : dev.tetokiretreat.co.nz
Database driver : mysql
Database hostname : localhost
Database username : root
Database name : tetoki_d7
Database : Connected
Drupal bootstrap : Successful
Drupal user : Anonymous
Default theme : tetoki
Administration theme : seven
PHP configuration : /Applications/MAMP/conf/php5.2/php.ini
Drush version : 4.2
Drush configuration :
Drush alias files : /Users/garethhall/.drush/aliases.drushrc.php
Drupal root : /Users/garethhall/Sites/tetokiretreat.co.nz/public_html
Site path : sites/default
File directory path : sites/default/files

Doing drush command: drush @dev.tetoki sql-conf --all

Array
(
[default] => Array
(
[default] => Array
(
[database] => tetoki_d7
[username] => root
[host] => localhost
[port] =>
[driver] => mysql
[prefix] =>
)

)

)

Doing drush command: drush @tetoki status

Drupal version : 7.0
Site URI : stage.tetokiretreat.co.nz
Database driver : mysql
Database hostname : localhost
Database username : *********
Database name : tetokiretr_d7
Database : Connected
Drupal bootstrap : Successful
Drupal user : Anonymous
Default theme : tetoki
Administration theme : seven
PHP configuration : /usr/local/lib/php.ini
Drush version : 4.2
Drush configuration :
Drush alias files :
Drupal root : /home/tetokiretr/public_html/stage
Site path : sites/default
File directory path : sites/default/files

Doing drush command: drush @tetoki sql-conf --all

Array
(
[default] => Array
(
[default] => Array
(
[database] => tetokiretr_d7
[username] => *********
[host] => localhost
[port] =>
[driver] => mysql
[prefix] =>
)

)

)

Doing drush command: drush sql-sync @dev.tetoki @tetoki

WARNING: Using temporary files to store and transfer sql-dump. It is recommended that you specify --source-dump and --target-dump options on the command line, or set '%dump' or '%dump-dir' in the path-aliases section of your site alias records. This facilitates fast file transfer via rsync.

You will destroy data from 113.21.225.179/tetokiretr_d7 and replace with data from tetoki_d7.

You might want to make a backup first, using the sql-dump command.

Do you really want to continue? (y/n): y
rsync: push_dir#3 "/private/tmp" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(545) [receiver=2.6.8]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-40/rsync/io.c(452) [sender=2.6.9]
bash: /private/tmp/113.21.225.179_tetokiretr_d7.sql.lMgoOW: No such file or directory

Hopefully you can see whats wrong.

greg.1.anderson’s picture

I don't understand this output:

rsync: push_dir#3 "/private/tmp" failed: No such file or directory (2)

What output do you see when you run drush sql-sync @dev.tetoki @tetoki -s? Do you have /private/tmp set somewhere, e.g. some $option setting in drushrc.php? Make sure that this path exists on both servers, and is writable. Drush sql-sync is not good about making appropriate temporary files for the remote server. Temp files are created and named locally, and then used on the remote machine. This can cause problems. Perhaps this is what is going on with your setup, since it looks like the db settings are being fetched w/out problem.

garethhallnz’s picture

I have not setup any $options in drushrc.php. Truth be told I don't now even if I should setup some stuff in there?
I also have not setup /private/tmp ..... I though about setting it up but was not sure where is it relative to drupal root?

drush command: drush sql-sync @dev.tetoki @tetoki -s

proc_open: /usr/local/lib/drush/drush.php --all --root='/Users/garethhall/Sites/tetokiretreat.co.nz/public_html' --uri='dev.tetokiretreat.co.nz' sql-conf --backend
proc_open: ssh -o PasswordAuthentication=no 'tetokiretr'@'113.21.225.179' 'drush --all --uri='\''stage.tetokiretreat.co.nz'\'' --root='\''/home/tetokiretr/public_html/stage'\'' sql-conf --backend'
Error: no database record could be found for @dev.tetoki

drhus’s picture

same problem!!

greg.1.anderson’s picture

Not sure what's going on here; if sql-conf works, then so should sql-sync. Have you tried with 5.x-dev too?

stockliasteroid’s picture

I had a similar issue, though I don't think it's identical... I believe the solution is covered here (http://drupal.org/node/930124).

I had both my @dev (source) and @staging (destination) aliases defined in sitename.aliases.drushrc.php in the root of my Drupal install, and I couldn't do a sql-sync between @dev and @staging. (drush sql-sync @dev @staging) without it reporting that it couldn't find a database record for @dev. However, if I did "drush sql-conf @dev" I would get the expected output. Ditto for @staging. In my case, I ended up moving the @dev alias definition out of my site-specific aliases file and into my .drush/aliases.drushrc.php file. It seems that the @dev site wasn't getting bootstrapped in time, so sql-sync never had the DB definition in order to do the sync.

Hoping this will help someone else, as it has me stuck for a couple of hours.

garethhallnz’s picture

Right so I thought I will upgrade drush and try this again.

I am now running drush 4.4 and still the same issue.

Gareth-MacBook:~ garethhall$ drush @dev.pushprint @pushprint sql-sync -v -d
Bootstrap to phase 0. [0.08 sec, 1.31 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.08 sec, 1.44 MB] [bootstrap]
Load alias @dev.pushprint [0.09 sec, 1.44 MB] [notice]
Load alias @local.default [0.11 sec, 1.45 MB] [notice]
Bootstrap to phase 5. [0.27 sec, 3.67 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.27 sec, 3.67 MB] [bootstrap]
Initialized Drupal 7.0 root directory at /Users/garethhall/Sites/pushprint.co.nz/public_html [0.32 sec, [notice]
4.57 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.33 sec, 4.57 MB] [bootstrap]
Initialized Drupal site dev.pushprint.co.nz at sites/default [0.33 sec, 4.57 MB] [notice]
Load alias @pushprint [0.34 sec, 4.58 MB] [notice]
Load alias @live.default [0.37 sec, 4.58 MB] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.37 sec, 4.57 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.38 sec, 4.58 MB] [bootstrap]
Successfully connected to the Drupal database. [0.38 sec, 4.58 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.46 sec, 5.01 MB] [bootstrap]
Begin redispatch via backend invoke [2.06 sec, 17.06 MB] [notice]
Running: ssh -o PasswordAuthentication=no 'pushprint'@'113.21.225.179' 'drush [command]
--dump-dir='\''/home/drush_tmp/sync-dump.sql'\'' --root='\''/home/pushprint/public_html'\''
--uri='\''pushprint'\'' --v --d sql-sync --backend 2>&1' 2>&1 [2.06 sec, 17.06 MB]
Bootstrap to phase 0. [2.97 sec, 17.1 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [2.97 sec, 17.1 MB] [bootstrap]
Bootstrap to phase 0. [2.97 sec, 17.1 MB] [bootstrap]
Found command: sql-sync (commandfile=sql) [2.97 sec, 17.1 MB] [bootstrap]
Initializing drush commandfile: user [2.97 sec, 17.1 MB] [bootstrap]
Including /opt/drush/commands/sql/sync.sql.inc [2.97 sec, 17.1 MB] [bootstrap]
Calling drush command init function: drush_sql_sync_init [2.97 sec, 17.1 MB] [bootstrap]
Undefined variable: alias_record sitealias.inc:238 [2.97 sec, 17.1 MB] [notice]
Undefined variable: alias_record sitealias.inc:238 [2.97 sec, 17.1 MB] [notice]
Undefined variable: alias_record sitealias.inc:238 [2.97 sec, 17.1 MB] [notice]
Undefined variable: alias_record sitealias.inc:238 [2.97 sec, 17.1 MB] [notice]
array_key_exists(): The second argument should be either an array or an object sitealias.inc:621 [2.97 [warning]
sec, 17.11 MB]
Undefined variable: alias_record sitealias.inc:238 [2.97 sec, 17.11 MB] [notice]
array_key_exists(): The second argument should be either an array or an object sitealias.inc:621 [2.97 [warning]
sec, 17.11 MB]
Undefined variable: alias_record sitealias.inc:238 [2.98 sec, 17.11 MB] [notice]
Undefined variable: alias_record sitealias.inc:238 [2.98 sec, 17.11 MB] [notice]
array_key_exists(): The second argument should be either an array or an object drush.inc:2047 [2.98 sec, [warning]
17.11 MB]
array_key_exists(): The second argument should be either an array or an object sitealias.inc:1360 [2.98 [warning]
sec, 17.11 MB]
array_key_exists(): The second argument should be either an array or an object sitealias.inc:1372 [2.98 [warning]
sec, 17.11 MB]
array_key_exists(): The second argument should be either an array or an object sitealias.inc:1372 [2.98 [warning]
sec, 17.11 MB]
Invalid argument supplied for foreach() sitealias.inc:1379 [2.98 sec, 17.11 MB] [warning]
array_key_exists(): The second argument should be either an array or an object sitealias.inc:1360 [2.98 [warning]
sec, 17.11 MB]
array_key_exists(): The second argument should be either an array or an object sitealias.inc:1372 [2.98 [warning]
sec, 17.11 MB]
array_key_exists(): The second argument should be either an array or an object sitealias.inc:1372 [2.98 [warning]
sec, 17.11 MB]
Invalid argument supplied for foreach() sitealias.inc:1379 [2.98 sec, 17.11 MB] [warning]
Error: no database record could be found for [2.98 sec, 17.11 MB] [error]
Command dispatch complete [2.98 sec, 17.11 MB] [notice]
Peak memory usage was 3.23 MB [2.98 sec, 17.12 MB] [memory]
Backend invoke is complete [2.98 sec, 17.1 MB]

alduya’s picture

Status: Postponed (maintainer needs more info) » Active

I'm having the same problem.

'drush sql-sync default @sitealias' results in:

rsync: push_dir#3 "/private/tmp" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(565) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-40/rsync/io.c(452) [sender=2.6.9]
Could not rsync from /private/tmp/sitename.sql.babrQh to                                                 [error]
xxxxxx@server:/private/tmp/sitename.sql.fBKpdc

'drush sql-sync default @sitealias -s' results in:

proc_open: /Applications/MAMP/bin/php5.3/bin/php /usr/lib/drush/drush.php --php='/Applications/MAMP/bin/php5.3/bin/php'  --all --root='/Users/alduya/Sites/sitename.be' --uri='default' sql-conf --backend  2>&1
array_key_exists() expects parameter 2 to be array, boolean given sitealias.inc:644                          [warning]
proc_open: ssh  'xxxxxx'@'server' '/opt/www/xxxxxx/web/drush/drush  --all --root='\''/opt/www/xxxxxx/web/sitename'\'' --uri='\''default'\'' sql-conf --backend 2>&1'  2>&1
array_key_exists() expects parameter 2 to be array, boolean given sitealias.inc:644                          [warning]
Error: no database record could be found for default  

'drush sql-conf default' results in:

Array
(
    [database] => databasename
    [username] => root
    [host] => localhost
    [port] => 
    [driver] => mysql
    [prefix] => 
)

I tried using drush-5.x-dev, but that did not help.

I wonder if it can have anything to do with the fact that I'm using MAMP for development. If us the 'mysql' command, I'm not able to 'show databases' any databases, but I can see them when I 'drush sql-cli' and then 'show databases'.

I hope this info helps you to help me.

garethhallnz’s picture

Interestingly I to use MAMP well actually MAMP PRO but the server part is the same core I believe. Perhaps it is the cause of the problem but on my system I thought I had accounted the the issue by adding the below to my .profile file.

alias drush="/Applications/MAMP/bin/php5.2/bin/php /usr/local/lib/drush/drush.php"
export COPYFILE_DISABLE=true
export PATH=/Applications/MAMP/bin/php5/bin:$PATH
export PATH=/Applications/MAMP/bin/php5/bin:/Applications/MAMP/Library/bin/:$PATH

But perhaps I am wrong

bdone’s picture

If it's helpful, I was getting this exact same error and solved it by including (and creating) a %dumps-dir in my remote site's alias:

$aliases['sitename.staging'] = array(
'uri' => 'DOMAIN.COM',
'root' => '/var/www/vhosts/DOMAIN.COM/httpdocs',
'db-url' => 'mysqli://USERNAME:PASSWORD@localhost/DATABASENAME',
'remote-host' => 'DOMAIN.COM',
'remote-user' => 'USERNAME',
'path-aliases' => array(
'%files' => 'sites/default/files',
'%dump-dir' => '/var/www/vhosts/DOMAIN.COM/tmp',
),
);

garethhallnz’s picture

Thank you for everyone who helped I finally have it working

I believe the core things that fixed it was.
1. Upgrading to the latest version of drush
2. Make sure paths are correct in your .profile file if using MAMP see #10
4. Make sure you have a public key setup and working
3. The major one (I think this was my problem all along)
Make sure you aliases file is setup correct and the your temp folder have write premission

This is what my aliases file look like

<?php
$aliases['local.default'] = array(
'path-aliases' => array(
'%files' => 'sites/default/files',
'%dump-dir' => '/Users/username/tmp',
),
);
$aliases['live.default'] = array(
'path-aliases' => array(
'%files' => 'sites/default/files',
'%dump-dir' => '/home/drush_tmp',
),
);
/*** mysite.co.nz ***/
$aliases['dev.mysite'] = array (
'root' => '/Users/username/Sites/mysite.co.nz/public_html',
'uri' => 'dev.mysite.co.nz',
'parent' => '@local.default',
);
$aliases['mysite'] = array (
'uri' => 'mysite',
'root' => '/home/mysite/public_html',
'remote-host' => 'mysite.co.nz',
'remote-user' => 'server-username',
'parent' => '@live.default',
);

Hope this helps someone out.

greg.1.anderson’s picture

Anyone care to post a patch that improves the drush error message when any of the above is not correct?

wOOge’s picture

I've been having a similar problem (for background see: http://drupal.org/node/1115048 ).

The following commands fail:

drush -v sql-sync @dev @live

drush -v sql-sync default @live  <-- this fails because the dump dir is not set, even though it is, inside the aliases file.

But the following command succeeds:

drush -v sql-sync default @live --target-dump=/var/www/website.com/drushdump/dump.sql --source-dump=/Applications/XAMPP/xamppfiles/htdocs/website.com/drushdump/dump.sql --no-cache

My aliases file is located at:

/Applications/XAMPP/xamppfiles/htdocs/website.com/aliases.drushrc.php

Help?

garethhallnz’s picture

Please show your aliases file

garethhallnz’s picture

I am not really sure how a patch would work in this case? I mean I believe the issue was my aliases file and not drushes fault.

greg.1.anderson’s picture

%dump works for me. You should try putting your alias file at a global location, such as $HOME/.drush or /etc/drush. The aliases file above will only be used when a site at that location is bootstrapped.

I'm not sure what the relationship is between %dump not being set and the "no database record could be found for ..." error message (which I do not get, regardless of whether or not %dump is set). If you can figure that one out, it would help a bunch of people. I don't see it, myself.

wOOge’s picture

StatusFileSize
new669 bytes

@greg.1.anderson That was the solution! - I moved the alias file to a global location: $HOME/drush (where drush is running from)

If I have the alias file inside the dev drupal root folder, I get the Error: no database record could be found for

For the record my alias file is attached in case it helps someone.

moshe weitzman’s picture

This requirement to put the alias in a global location for sql-sync is a real gotcha. Any chance we can bootstrap to root if needed? I have not looked at code at all.

greg.1.anderson’s picture

Title: Error: no database record could be found for » Deceptive error message when alias record not found: "no database record could be found for @site"
Assigned: Unassigned » greg.1.anderson

There's a chicken-and-the-egg problem with alias files at the root; they will only be found there if cwd or --root is set. I could try a little harder to get these, but it won't always be possible to help folks here.

The real gotcha in this case is the 'no database record could be found' error message. This error is printed out when the alias record cannot be found. sql-sync needs to error out sooner and correctly report that it cannot find the alias record. Finally reproduced this on my end by using an invalid alias -- then it was clear what was going on. In the past, it would correctly say 'alias record not found'; this is a relatively recent breakage (although it has been in 4.x for a while, so not super-recent).

wOOge’s picture

Thanks for all the help and time in diagnosing the issue.
Drush already rocked, now it's even better.

stockliasteroid’s picture

The bummer about the bootstrap issue is that it's not possible to include common aliases inside of a site's root folder for inclusion in version control. We're developing with a team, and while the local dev alias may need to be put in .drush for each developer, the staging and live aliases will be the same for everyone. During development it's sometimes handy to do a `drush sql-sync @live @staging` so that we get the latest live data on the staging server, which currently won't work without including the staging alias in .drush instead of in the site's alias file.

Does anyone have a way around this that I'm not thinking of? Ideally I'd like to keep aliases with the site they belong to, not in a monolithic set of aliases in ~/.drush.

moshe weitzman’s picture

A workaround is to set --alias-path to point to wherever you have checked in the shared aliases. See example.drushrc.php for more info.

blb’s picture

i've been having this same problem with drush 4.4 and aliases stored in ~/.drush.

one strange thing i've noticed is that sql-sync fails with --simulate=1 with the same error msg:

array_key_exists(): The second argument should be either an array or [warning]
an object sitealias.inc:644
Error: no database record could be found for @myalias

but when i use --simulate=0 it works fine and no error msg at all!

here is my alias file:

<?php

$aliases['dev'] = array (
  'root' => '/websites/public_html/drupal6',
  'uri' => 'http://mysite.dev',
  'path-aliases' => array(
        '%dump-dir' => '/websites/_dumps/',
        '%dump-date' => '/websites/_dumps/mysite.net_' . date("Ymd") . '.sql',
        '%dump' => '/websites/_dumps/mysite.net_dump.sql',
	),

  'command-specific' => array (
    'sql-sync' => array (
      'simulate' => '0',
    ),
    'rsync' => array (
      'simulate' => '0',
      'exclude-files' => '1',
      'exclude-sites' => '1',
      'exclude-other-sites' => '1',
      'mode' => 'rlptDz',
      'exclude-paths' => '.git:.DS_Store:.project:.gitignore',
    ),
  ),

);

$aliases['net'] = array (
  'root' => '/home/username/www/drupal6',
  'uri' => 'http://mysite.net',
  'remote-host' => 'mysite.net',
  'remote-user' => 'username',
  'ssh-options' => '-p 2222',
      'path-aliases' => array(
      '%drush' => '/home/username/drush',
      '%drush-script' => '/home/username/drush/drush',
      '%dump-dir' => '/home/username/dumps/',
      '%dump-date' => '/home/username/dumps/mysite.net_' . date("Ymd-Hms") . '.sql',
      '%dump' => '/home/username/dumps/mysite.net_dump.sql',
      '%files' => 'sites/mysite.net/files',
     ),
     
 'command-specific' => array (
    'sql-sync' => array (
      'simulate' => '1',
    ),
    'rsync' => array (
      'simulate' => '1',
      'exclude-files' => '1',
      'exclude-sites' => '1',
      'exclude-other-sites' => '1',
      'mode' => 'rlptDz',
      'RSYNC-FLAG' => 'delete',
      'exclude-paths' => '.git:.DS_Store:.project:.gitignore',
    ),
  ),
    
);

mrfelton’s picture

setting simulate to 0 resolves for me too.

greg.1.anderson’s picture

Category: support » bug
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

dkinzer’s picture

+1 @greg.1.anderson moving the alias file to ~/.drush helped me.

ressa’s picture

Adding '%dump-dir' => '/tmp', fixed it for me, like this:

  'path-aliases' => array(
    '%files' => 'sites/default/files',
    '%dump-dir' => '/tmp',
  ),