Merge pull request #370 from YunoHost-Apps/enh_mysql_single-transaction

Make MySQL dumps with a single transaction to ensure backup consistency
This commit is contained in:
Laurent Peuch 2017-10-03 22:19:53 +02:00 committed by GitHub
commit b675f4168c

View file

@ -73,7 +73,7 @@ ynh_mysql_drop_db() {
# | arg: db - the database name to dump
# | ret: the mysqldump output
ynh_mysql_dump_db() {
mysqldump -u "root" -p"$(sudo cat $MYSQL_ROOT_PWD_FILE)" --skip-dump-date "$1"
mysqldump -u "root" -p"$(sudo cat $MYSQL_ROOT_PWD_FILE)" --single-transaction --skip-dump-date "$1"
}
# Create a user