Skip to content

Commit 3d0e6dd

Browse files
authored
Do not skip backup if LA is above threshold
1 parent 0bab3cd commit 3d0e6dd

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

bin/v-backup-user

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,19 @@ email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \')
5656

5757
# Checking load average
5858
la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
59-
i=0
59+
# i=0
6060
while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do
6161
echo -e "$(date "+%F %T") Load Average $la"
6262
sleep 60
63-
if [ "$i" -ge "15" ]; then
64-
la_error="LoadAverage $la is above threshold"
65-
echo "$la_error" |$SENDMAIL -s "$subj" $email $notify
66-
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
67-
check_result $E_LA "$la_error"
68-
fi
63+
wait_for_backup_if_it_is_not_time_for_backup
64+
# if [ "$i" -ge "15" ]; then
65+
# la_error="LoadAverage $la is above threshold"
66+
# echo "$la_error" |$SENDMAIL -s "$subj" $email $notify
67+
# sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
68+
# check_result $E_LA "$la_error"
69+
# fi
6970
la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
70-
(( ++i))
71+
# (( ++i))
7172
done
7273

7374
if [ -z "$BACKUP_TEMP" ]; then

0 commit comments

Comments
 (0)