You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bin/v-backup-user
+24-19Lines changed: 24 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -160,7 +160,7 @@ if [ -z "$BACKUP" ]; then
160
160
fi
161
161
162
162
# Check if backup folder exists and have the correct permission
163
-
if [[ !-d"$BACKUP" ]];then
163
+
if [[ !-d"$BACKUP" ]];then
164
164
mkdir -p $BACKUP
165
165
fi
166
166
if [ "$(stat -c %a "$BACKUP")"!= 755 ];then
@@ -179,9 +179,12 @@ let u_disk=$(($(get_user_disk_usage) * 2))
179
179
let v_disk=$(($(stat -f --format="%a*%S" $BACKUP)))/1024/1024
180
180
181
181
if [ "$u_disk"-gt"$v_disk" ];then
182
+
let u_disk_original=$(get_user_disk_usage)
182
183
# Always notify on failure
183
-
echo"not enough diskspace available to perform the backup."|$SENDMAIL -s "$subj""$email""yes"
184
-
check_result "$E_LIMIT""not enough diskspace available to perform the backup."
184
+
echo"Not enough disk space available ($v_disk mb) to perform the backup of $user. ( $u_disk_original mb * 2 = $u_disk mb). https://hestiacp.com/docs/server-administration/backup-restore.html"|$SENDMAIL -s "$subj""$email""yes"
185
+
# Deleting task from queue
186
+
sed -i "/v-backup-user $user /d"$HESTIA/data/queue/backup.pipe
187
+
check_result "$E_LIMIT""not enough disk space available ($v_disk mb) to perform the backup of $user. ( $u_disk_original mb * 2 = $u_disk mb)."
0 commit comments