File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ All notable changes to this project will be documented in this file.
3030- Fixed an issue with Restore Failed on Domains with Mail Setups using SSL (#1069 )
3131- Fixed an issue with PHPMyAdmin button (#1078 )
3232- Changed WordPress name in Webapp installer (#1074 )
33+ - Add a free disk space validation during backup routine (#1115 )
34+
3335
3436## [ 1.2.3] - Service Release
3537### Features
Original file line number Diff line number Diff line change @@ -55,6 +55,15 @@ start_time=$(date '+%s')
5555subj=" $user → backup failed"
5656email=$( grep CONTACT $HESTIA /data/users/admin/user.conf | cut -f 2 -d \' )
5757
58+ # Validate available disk space (take usage * 2, due to the backup handling)
59+ let u_disk=$( grep " U_DISK=" $HESTIA /data/users/$user /user.conf | cut -f 2 -d \' ) * 2
60+ let v_disk=$(( $(stat - f -- format= "% a*% S" $BACKUP )) )/1024/1024
61+
62+ if [ " $u_disk " -gt " $v_disk " ]; then
63+ echo " not enough diskspace available to perform the backup." | $SENDMAIL -s " $subj " $email $notify
64+ check_result $E_LIMIT " not enough diskspace available to perform the backup."
65+ fi
66+
5867if [ -z " $BACKUP_TEMP " ]; then
5968 BACKUP_TEMP=$BACKUP
6069fi
You can’t perform that action at this time.
0 commit comments