2

I have a dev and staging alias setup for drush and they are both working correctly. I included a reference to where I want the dump file placed during a drush sql-sync using

  'path-aliases' => array(
    '%dump-dir' => '/home/.drush/db_dumps'
  )

However, when I run the command it runs successfully but it doesn't use my dump directory. Instead it uses /home/user/drush-backups. I tried changing the location of my dump-dir to a location inside of the drupal site folder, but it still doesn't work.

One of the solutions that I found was to include the --source-dump option (which points to the same location as I have in %dump-dir) when running drush sql-sync. It seems like if that's the case, then why even bother adding it in my alias file.

Another solution states to also include a reference to the actual dump file using %dumpin the path-aliases array. I tried that and it still doesn't work.

Is there a solution to this or is it not suppose to work at all?? Because the example.aliases.drushrc.php file doesn't mention dump-dir at all.

Using: Ubuntu 14.0.4, Drush 8.0.5, Drupal 8 site

Thanx

  • Haven't tried to reproduce this, but looks like it could be a bug in Drush 8.0.5. – greg_1_anderson Apr 8 '16 at 19:16
  • @greg_1_anderson I would have to dig, but I'm pretty sure this was a bug in Drush 6 that I submitted a PR for that got merged. It's possible that there was a regression. – mpdonadio Apr 9 '16 at 1:07
  • @MPD sql-sync was rewritten in Drush 7; may have been re-introduced there. – greg_1_anderson Apr 9 '16 at 13:33
2

I actually posted the same question in the Drush GitHub and they did in fact tell me that sql-sync was rewritten (removed in e89c7c4) and it no longer includes the option for a dump-dir.

As per GH #2125, they've said:

It gzips and transfers the full dump every time. It uses a temp file in your specified temp dir for the transfer. Files are deleted right after rsync.

So I guess all documentation that is out there is old.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.