Hi,

I have a quite huge website that I have to archive, with a really big database.
I prepared a drushrc.php file with $command_specific settings for archive-dump and sql-dump to avoid dump trash files and data.
When I launch the archive-dump, I have no option to force it to use my sql-dump settings nor to choose to not export the database.

Would it be possible to find a solution for this ?
Thanks

Comments

moshe weitzman’s picture

Title: Use sql-dump $command_specific during the archive-dump » Optionally skip files dir and sql-dump in archive-dump command
Version: 7.x-5.x-dev » 8.x-6.x-dev

there is no way yet to skip the sql dump. it would be good to add a way to skip the files directory as well.

you can pass options that are valid for sql-dump but you also have to pass strict=0 until 5.9 is released. we improved this in #1895668: Allow --structure-tables-list and --skip-tables-list in sql-sync command without --strict=0. however, $command_specific won't work here because the command is archive-dump, not sql-dump. for now, just set same options for archive-dump that you have in sql-dump. so $command_specific['archive-dump'] = $command_specific['sql-dump']

duaelfr’s picture

Good tip thank you !

I didn't find anything like this in the documentation so it should be usefull to add it somewhere.

moshe weitzman’s picture

Title: Optionally skip files dir and sql-dump in archive-dump command » Optionally skip files dir and sql-dump in archive-dump command. Fork sql-dump call instead of same process.

Well, I think we should change our implementation in archive-dump and elsewhere so that this is a non-issue. I used to occasionally avoid using drush_invoke_process() but it now mature enough to use almost everywhere. Changed title accordingly.

greg.1.anderson’s picture

Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.