Skip to content

Instantly share code, notes, and snippets.

@Luukyb
Created May 4, 2015 09:22
Show Gist options
  • Save Luukyb/dfa4322bbf00b44ef128 to your computer and use it in GitHub Desktop.
Save Luukyb/dfa4322bbf00b44ef128 to your computer and use it in GitHub Desktop.
Create lighter sql dump files with drush using this drushrc.php file
<?php
/**
* @file
* Example of a drushrc.php file with cache tables setup.
*
* This setup will allow you to create smaller sql dump files by excluding the
* cache tables.
* drushrc.php can be placed in ~/.drush/ or inside your sites/default.
* Then you can use something like:
* $ drush sql-dump --result-file=myproject-dev-db.sql --skip-tables-key=cache
*/
// Some common cache tables.
// Remove the tables you don't have.
$options['structure-tables'] = array(
'cache' => array(
'accesslog',
'cache',
'cache_admin_menu',
'cache_block',
'cache_bootstrap',
'cache_field',
'cache_filter',
'cache_form',
'cache_image',
'cache_menu',
'cache_metatag',
'cache_page',
'cache_path',
'cache_rules',
'cache_token',
'cache_update',
'cache_views',
'cache_views_data',
'cache_widgets',
'history',
'watchdog',
),
);
$options['structure-tables-key'] = 'cache';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment