You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want backup drupal database and ignore cache_* tables to reduce the backup size.
I'm using EXTRA_BACKUP_OPTS for add extra --ingore-tables with variable $db, but it does not works. The backup SQL file still including the cache_* tables.
If I'm using --ignore-table=dsf.watchdog without ${db} variable, it works.
I have also tried DB_NAME variable, but still not works.
Here are 2 issues:
How I can do this with dynamic db name?
I want to dump only the data structure append to the backup SQL,How to do this? I'm tring the pre/post scripts but looks can't do this. Here is the example scripts FYI.
special_tables=$(mysql -h $DB_HOST -P$DB_PORT -u$DB_USER -p$DB_PASS -N -e "SELECT GROUP_CONCAT(table_name SEPARATOR ' ') FROM information_schema.tables WHERE table_schema='$DB_NAME' AND (table_name LIKE 'cache%' OR table_name = 'watchdog') AND table_type = 'BASE TABLE'")
mysqldump --single-transaction -h $DB_HOST -P$DB_PORT -u$DB_USER -p$DB_PASS $DB_NAME --no-data $special_tables >> $FILE_NAME
I want backup drupal database and ignore
cache_*
tables to reduce the backup size.I'm using
EXTRA_BACKUP_OPTS
for add extra --ingore-tables with variable $db, but it does not works. The backup SQL file still including thecache_*
tables.If I'm using
--ignore-table=dsf.watchdog
without ${db} variable, it works.I have also tried
DB_NAME
variable, but still not works.Here are 2 issues:
Here it the example docker-compose.yml
The text was updated successfully, but these errors were encountered: