1

I sync my database with drush sql-sync @dev @live and the other way round. Can I omit the following tables safely, like in my drushrc.php from sql-sync?

$options['structure-tables'] = array(
   'common' => array(
     'cache', 'cache_filter', 'cache_menu', 'cache_page', 
     'cache_admin_menu' 'cache_block', 'cache_coder', 
     'cache_content', 'cache_form', 'cache_hierarchical_select', 
     'cache_location', 'cache_update', 
     'cache_views', 'cache_views_data', 
     'ctools_css_cache', 'ctools_object_cache', 
     'history', 'sessions', 'watchdog'
   ),
);

Additionally I wanted to exclude variable_cache and views_object_cache if that is safe.

Is that a good practice? Is there a list of tables somewhere on drupal.org for all modules?

2

If you update to the latest dev version of Drush, you will find the following definition in examples/example.drushrc.php:

# $options['structure-tables']['common'] = array('cache', 'cache_*', 'history', 'search_*', 'sessions', 'watchdog');

The wildcard syntax is very useful, as with it, it is no longer necessary to make a comprehensive list of all cache tables used by all of your contrib modules. Note that you must use the latest version of Drush pulled from git; the 8.x-6.x-dev from 18 June does not have wildcard support.

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.