Backup error
-
- Posts: 13
- Joined: Tue Dec 22, 2015 8:34 pm
Backup error
The backup isn't getting the data from the folder /home/*user*/web/*domain.tld*/*. The error is:
VestaCP version: 0.9.8-17.
Code: Select all
/usr/local/vesta/func/domain.sh: line 238: 3
40: syntax error in expression (error token is "40")
Code: Select all
# Get config top and bottom line number
get_web_config_lines() {
tpl_lines=$(egrep -ni "name %domain_idn%" $1 |grep -w %domain_idn%)
tpl_lines=$(echo "$tpl_lines" |cut -f 1 -d :)
tpl_last_line=$(wc -l $1 |cut -f 1 -d ' ')
if [ -z "$tpl_lines" ]; then
check_result $E_PARSING "can't parse template $1"
fi
vhost_lines=$(grep -niF "name $domain_idn" $2)
vhost_lines=$(echo "$vhost_lines" |egrep "$domain_idn($| |;)") #"
vhost_lines=$(echo "$vhost_lines" |cut -f 1 -d :)
if [ -z "$vhost_lines" ]; then
check_result $E_PARSING "can't parse config $2"
fi
top_line=$((vhost_lines + 1 - tpl_lines)) ##line 238
bottom_line=$((top_line - 1 + tpl_last_line))
multi=$(sed -n "$top_line,$bottom_line p" $2 |grep ServerAlias |wc -l)
if [ "$multi" -ge 2 ]; then
bottom_line=$((bottom_line + multi -1))
fi
}
Re: Backup error
Try to rebuild WEB first.