madeITBelgium / vesta

VESTA Control Panel
https://www.tpweb.org
GNU General Public License v3.0
34 stars 14 forks source link

Improve database mysqldump script #99

Closed madeITBelgium closed 3 years ago

madeITBelgium commented 3 years ago

On a few servers, we have u user where there aren't recent backups. This is because of a mysqldump error:

Error: dump DBNAME failed\nmysqldump: Couldn't execute 'show create table `VIEWNAME`': Illegal mix of collations (utf8mb4_general_ci,COERCIBLE), (utf8mb4_unicode_ci,COERCIBLE), (utf8mb4_unicode_ci,COERCIBLE) for operation 'replace' (1270)

Solution:

A possible solution, make some config parameters to add extra options to the mysqldump command.

https://github.com/madeITBelgium/vesta/blob/master/func/db.sh#L58

ex: --ignore-table="DB.TABLE"