The remote and local directories I've specified in my aliases files exist and are owned by my user (drush is run under my user).
$aliases['dev'] = array( 'parent' => '@parent', 'site' => 'mysite', 'env' => 'dev', //[user, host, ssh options, etc.] 'path-aliases' => array( '%files' => 'sites/default/disk', '%dump-dir' => '/home/joe/drush-backups/mysite_dev', ), ); $aliases['local'] = array( 'parent' => '@parent', 'site' => 'mysite', //[root] 'path-aliases' => array( '%files' => 'sites/default/files', '%dump-dir' => '/Users/joe/Sites/mysite/tmp', ), );
Yet I get a warning on sql-sync:
drush -v sql-sync @dev @local Loaded alias @local from file /Users/joe/.drush/soa.aliases.drushrc.php
[notice] Loaded alias @dev from file /Users/joe/.drush/soa.aliases.drushrc.php
[notice] Local sql cache file does not exist.
[notice] ssh -i "/Users/joe/.ssh/id_rsa" -p "6421" email@example.com 'drush --backend=2 --root=/var/www/html/dev sql-query '\''SHOW TABLES'\'' 2>&1' 2>&1 [notice] 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 in drupal_test and replace with data from server/mysite_dev.
You might want to make a backup first, using the sql-dump command.
And if I continue, I get an error that indicates drush was trying to write to a different directory.
Do you really want to continue? (y/n): y Calling system(ssh -i "/Users/joe/.ssh/id_rsa" -p "6421" joe@server 'mysqldump --result-file /private/var/folders/mr/c99kf6c11_bdsr62m242c59c0000gq/T/mysite_dev1WyWuk --no-autocommit --single-transaction --opt -Q mysite_dev --host=myhost --user=mysite_dev --password='\''[pw]'\'' --skip-extended-insert --order-by-primary 2>&1'); mysqldump: Can't create/write to file '/private/var/folders/mr/c99kf6c11_bdsr62m242c59c0000gq/T/mysite_dev1WyWuk' (Errcode: 2) Database dump failed
[error] Command dispatch complete
I've got all my drush commands working between remote directories run on the site. I am able to rsync between local and remote directories since specifying files path aliases in aliases.drushrc.php.
What am I missing? I have the latest version of drush in both places, so I don't think I need the patch pointed to at How do I set the drush tmp directory?...