Closed crisward closed 7 years ago
I'd rather this be optional. I'll take a look in a bit.
Thanks..
It would perhaps make sense for this to apply to the general database api. Not sure if it has an equivalent in postgres / rethink etc. If not, perhaps an ability to pass though options to mysql dump. So just dokku mariadb:export MYDB --lock-tables=false
?
Probably we would not lock tables by default and then have the flag be --lock-tables
. That would ease migration into this functionality.
Sounds cool. Thanks.
If you haven't got time for this, let me know and I'll do a pull request.
I'd like to roll it into this work here: https://github.com/dokku/dokku-redis/issues/64
Makes sense..
Closing in favor of the mentioned issue.
The export command (mysql dump) by default locks all the tables. For a big export on a large site this can cause the site to become unresponsive. Although locking tables protects data consistency, it's often better to risk that and not kill the site during a backup.
So I propose changing https://github.com/dokku/dokku-mariadb/blob/master/functions#L64
from
to
Thoughts?
If it helps, we did it on the previous mariadb plugin - https://github.com/Kloadut/dokku-md-plugin/commit/91fb68ec15ae0721c37444b3b96cf9f03438ef55