This is a fairly specific requirement of mine but it opens up the possible need for other database-specific options.
I'm backing up databases which all contain a table that I don't need backing up and I currently specify this with --ignore-table. The --ignore-table option of mysqldump must specifiy both the the database name and the table so adding it in MYSQL_OPTS isn't going to work, as it is.
Needing this as a general option common to all databases being backed up is admittedly unlikely and it's only applicable to me because all the databases that I'm backing up are of the same schema (I don't even know what happens if you specify this option for a database that doesn't contain the table you want to ignore either).
Is it therefore worth considering this as a database-specific option in config? Something like:
MYSQL_OPTS_IGNORE_TABLE="db1_name.ignore_me db2_name.ignore_this db3_ignore_me"
It shouldn't be too hard to parse/match these and apply accordingly in the call to mysqldump.
This is a fairly specific requirement of mine but it opens up the possible need for other database-specific options.
I'm backing up databases which all contain a table that I don't need backing up and I currently specify this with --ignore-table. The --ignore-table option of mysqldump must specifiy both the the database name and the table so adding it in MYSQL_OPTS isn't going to work, as it is.
Needing this as a general option common to all databases being backed up is admittedly unlikely and it's only applicable to me because all the databases that I'm backing up are of the same schema (I don't even know what happens if you specify this option for a database that doesn't contain the table you want to ignore either).
Is it therefore worth considering this as a database-specific option in config? Something like: MYSQL_OPTS_IGNORE_TABLE="db1_name.ignore_me db2_name.ignore_this db3_ignore_me"
It shouldn't be too hard to parse/match these and apply accordingly in the call to mysqldump.