Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Set Drush Backup Directory

Tags:

drupal

drush

I just wanted to ask the question of how to set the Drush backup directory in drushrc.php. The result being that you can save your Drush archive-dump, ard, arb etc. where you want, rather than in the default ~/drush-backups/* directory. Yes you can do this with the --destination flag, but lets be honest that's pretty annoying if you just want to save in the same place all the time.

like image 965
CodeNinja Avatar asked Nov 12 '14 04:11

CodeNinja


1 Answers

This took me hours to figure out embarrassingly, so I just wanted to share this with anyone looking for this in the future as I could not find a single answer to this anywhere at the time. You just need to set the 'backup-dir' option in your drushrc.php like this:

$options['backup-dir'] = '/your/new/backup-dir';

Note no trailing slash.

I hope someone else finds this useful.

like image 75
CodeNinja Avatar answered Nov 08 '22 21:11

CodeNinja