Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Backup error

General questions about VestaCP
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
robindirksen
Posts: 13
Joined: Tue Dec 22, 2015 8:34 pm

Backup error
  • Quote

Post by robindirksen » Thu Feb 16, 2017 10:55 am

The backup isn't getting the data from the folder /home/*user*/web/*domain.tld*/*. The error is:

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
}
VestaCP version: 0.9.8-17.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Backup error
  • Quote

Post by skurudo » Tue Feb 21, 2017 11:43 am

Try to rebuild WEB first.
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password