databacker / mysql-backup

image to enable automated backups of mysql databases in containers
636 stars 178 forks source link

Support for additional `mysqldump` options (`events`, `triggers`, `routines`, etc.) #346

Open dabico opened 5 days ago

dabico commented 5 days ago

I did not manage to find any information in the documentation (both the dump --help and in the configuration.md file), but is there a way I can pass custom flags to the dump command to include objects like triggers and events in my dump? For example, I use the following for mysqldump:

[mysqldump]
quick
events
triggers
routines
single-transaction
max-allowed-packet=1G
deitch commented 5 days ago

That is because mysql-backup (v1.0.0+ versions) doesn't actually use mysqldump. It is not a script, but a single binary, that incorporates mysql functionality to create the dump.

If there is functionality missing, definitely open to adding it; that is how it has grown to this point. And Pull Requests obviously are much appreciated.

dabico commented 5 days ago

Thank you for the fast answer! 😄

I've never programmed in Go, but I'll take a glance at the code and give it a try. Always wanted to learn the language too.

deitch commented 5 days ago

Sure thing. Feel free to ask questions here.