From 0bbcacc74f55de1563dd62520b3790f408b52c03 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:41:02 +0200 Subject: [PATCH] ALLOW_MYSQL_REPAIR --- bin/v-backup-users | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/v-backup-users b/bin/v-backup-users index 9987b737..640c1916 100755 --- a/bin/v-backup-users +++ b/bin/v-backup-users @@ -17,6 +17,12 @@ source /etc/profile source $VESTA/func/main.sh source $VESTA/conf/vesta.conf +ALLOW_MYSQL_REPAIR=1 + +if [ $# -ge 1 ]; then + ALLOW_MYSQL_REPAIR=$1 +fi + #----------------------------------------------------------# # Action # @@ -32,7 +38,9 @@ if [ ! -z "$NOTIFY_ADMIN_FULL_BACKUP" ]; then fi # Auto-repair all databases before backuping all accounts -nice -n 19 ionice -c 3 mysqlrepair --all-databases --check --auto-repair >> $log 2>&1 +if [ $ALLOW_MYSQL_REPAIR -eq 1 ]; then + nice -n 19 ionice -c 3 mysqlrepair --all-databases --check --auto-repair >> $log 2>&1 +fi if [ -z "$BACKUP_SYSTEM" ]; then exit