upgrade_checks.sh: Check if backup log exists
upgrade_checks.sh will hang if no cPanel backup log is found. This can occur if there is insufficient space to take a cPanel backup since no file descriptor is opened to write a log to /usr/local/cpanel/logs/cpbackup.
+ echo 'Initiating cPanel backups.'
Initiating cPanel backups.
+ /usr/local/cpanel/bin/backup --force
[2020-09-22 03:09:05 -0400] info [backup] Started at Tue Sep 22 03:09:05 2020
[2020-09-22 03:09:05 -0400] warn [backup] Available disk space (1 percent) is too low. Backups will not run.
++ cat /var/cpanel/new_backuprunning
+ backup_pid=17999
++ lsof +D /usr/local/cpanel/logs/cpbackup
++ egrep -o '/usr/local.*\.log'
++ sort -u
+ backup_log=
+ watchBackup 17999 ''
+ local -r backup_pid=17999 backup_log=
+ local -ir bar_width=50
+ local -r 'bar_color_active=\e[102m' 'bar_color_active_half=\e[42m' 'bar_color_reset=\e[0m'
+ local -r 'bar_color_stalled=\e[103m' 'bar_color_stalled_half=\e[43m'
+ local fill_color fill_color_half
++ wc -l
+ local -ir account_total=3
+ local -ir actions_total=16
+ local -i mount_done=0 sql_done=0 system_done=0 backup_done=0
+ local -i account_actions_done=0 accounts_done=0
+ local -i actions_complete=0 backup_progress=0 filled_spaces=0
+ local -i cpuwatch_stall=0
+ echo -e 'Monitoring the backup process. Log: '
Monitoring the backup process. Log:
+ '[' -d /proc/17999 ']'
+ echo -e '\nBackup has completed!'
Backup has completed!
++ awk -F ' : ' '/info \[backup\] Running dir & file backup with target : / {print($2)}' ''