5

I understand how to use /etc/drush/drush.ini; however, I don't know what exactly to put in there in order for Drush to use a different temp directory when creating an archive-dump.

2
$options['dump-dir'] = '/path/to/dumpdir';

found in example.drushrc.php :)

  • Maybe I'm missing something. As indicated, I copied the contents of example.drushrc.php into /etc/drush/drushrc.php; commented out the line for the temp directory, and still get this output when I perform a drush archive-dump: temp : /tmp – Mike Broyles Mar 13 '13 at 0:19
  • Perhaps I should clarify a bit. I need to be able to have a drush archive-dump use a different directory than /tmp (which I think is set via an environment variable.) My /tmp mount point is too small to handle a drush archive-dump; so the dump fails. – Mike Broyles Mar 13 '13 at 0:34
  • have you tried speciying the --destination parameter ? – mojzis Mar 13 '13 at 0:58
  • I did...however it still uses /tmp as a temporary storing place during the achive-dump process. – Mike Broyles Mar 13 '13 at 13:39
  • I can confirm that this does not solve the issue either. The temporary dump file is still stored in /tmp – ñull Jul 31 '17 at 17:20
1

You can change drush temp directory by seting the TEMP environment variable.

In linux:

export TEMP=/mnt/tmp

will instruct drush to store your temporary dump to /mnt/tmp.

Depends on operating system, it can be set with different variable. For more details, the code is here: drush/includes/filesystem.inc: function drush_find_tmp()

https://github.com/drush-ops/drush/blob/de8106ba13a286320fcced88f04fbe6ae119fd4b/includes/filesystem.inc#L436

  • Tried this and does not help the issue. Archive dump is still using /tmp even when I changed sys_temp_dir in my custom php.ini. – ñull Jul 31 '17 at 17:19
0

For Drush 6, see https://drupal.org/node/1806416. That patch may or may not get backported to Drush5. See that link for current status.

0

For Drush 7 sql-sync you can specify --target-dump

That specifies the actual file Drush will write to on the target.

$ drush sql-sync @site.prod @site.self --target-dump=/tmp/self/prod-db.sql.gz

NB This should answer " Perhaps I should clarify a bit. I need to be able to have a drush archive-dump use a different directory than /tmp (which I think is set via an environment variable.) My /tmp mount point is too small to handle a drush archive-dump; so the dump fails. – Mike Broyles Mar 13 '13 at 0:34", but I don't have reputation here so therefor a new answer.

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.