4

The following command does exactly what I want — It dumps an archive, excluding all of the files and directories that I don't want:

$ drush archive-dump --tar-options="--exclude=.git --exclude=*.psd --exclude=sites/default/files/styles/ --exclude=sites/default/files/private/backup_migrate/manual/"

Can anyone show me how to set these extra command-specific archive-dump tar-options inside a site-alias array in aliases.drushrc.php?

I've tried every variation I can think of, but I can't seem to get the syntax right.

Update Here is a gist with my full test setup including verbose output and -debug info.

1

It should be like this - Edit: I've just confirmed that the following works as expected with Drush 6.3:

$aliases['example.com'] = array(
  'uri' => 'example.com',
  'root' => '/var/www/example.com/public_html',
  'command-specific' => array (
    'archive-dump' => array (
      'tar-options' => '--exclude=directory1 --exclude=sites/all/modules --exclude=*.txt',
    ),
  ),
);

I did notice that %files didn't work (Warning: sprintf(): Too few arguments exec.inc:138).

|improve this answer|||||
  • This doesn't seem to work. – Zach Harkey Aug 13 '14 at 17:52
  • I've just confirmed that this example works with Drush 6.3. Do you get an error? Maybe try with --debug option? – arjan Aug 14 '14 at 20:27
  • I was using Drush 6.2, So I upgraded to 6.3 and started with a fresh Drupal install and a site alias closely matching your example. It still isn't working for me. Here is a gist with my full test setup including verbose output and -debug info. – Zach Harkey Aug 15 '14 at 8:29

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.