I have a drush config file ~/.drush/drushrc.php:
if (!isset($options['structure-tables']['common'])) {
$options['structure-tables']['common'] = array(
'cache', 'cache_*', 'history', 'search_*', 'sessions', 'watchdog'
);
}
$options['structure-tables']['common'] = array_merge($options['structure-tables']['common'],
array('ctools_css_cache', 'ctools_object_cache', 'logz', 'views_object_cache')
);
And I have a bash script file:
/usr/bin/drush sql-dump --root="/home/username/domains/sitename/www" --skip-tables-key="common" --gzip --result-file=/home/username/backup/$year/$month/dbname_$date_now_time.sql
But when I execute it the backup file still have data in cache tables. What am I doing wrong?
And second question is - If I put this into crontab do I need to put configuration file somewhere else?
I use Drush version 8.
drushrc.php
is not being run. Try a var_dump of the$options['structure-tables']
in thedrushrc.php
just to confirm that it's being run.