Make MySQL dumps with a single transaction to ensure backup consistency

This commit is contained in:
Jimmy Monin 2017-09-14 22:12:01 +02:00
parent a6639c4530
commit 8a559f2ae1

View file

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