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 exclusions do not work

General questions about VestaCP
Post Reply
  • Print view
Advanced search
11 posts
  • 1
  • 2
  • Next
hedgehog90
Posts: 25
Joined: Wed Sep 09, 2015 7:19 pm

Backup exclusions do not work
  • Quote

Post by hedgehog90 » Sun Oct 18, 2015 4:56 pm

I need to prevent a large folder from being backed up. The directory in question is not inside public_html, but it is one level up: /home/username/web/example.com/uploads

I've tried the following:

Web:
example.com:uploads

User Directories:
web/example.com/uploads
/home/username/web/example.com/uploads

Help!
Top

hedgehog90
Posts: 25
Joined: Wed Sep 09, 2015 7:19 pm

Re: Backup exclusions do not work
  • Quote

Post by hedgehog90 » Sat Oct 24, 2015 4:12 pm

I've been patient, still no replies... Really?
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Backup exclusions do not work
  • Quote

Post by imperio » Sat Oct 24, 2015 4:15 pm

OS on your server is Ubuntu ?
Top

hedgehog90
Posts: 25
Joined: Wed Sep 09, 2015 7:19 pm

Re: Backup exclusions do not work
  • Quote

Post by hedgehog90 » Mon Oct 26, 2015 11:40 am

Yep, Ubuntu 14.

Also, I'd like to know how to exclude a folder in web/example.com. Can't get that to work either through the user directories exclusion.
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Backup exclusions do not work
  • Quote

Post by imperio » Mon Oct 26, 2015 12:02 pm

hedgehog90 wrote:Yep, Ubuntu 14.

Also, I'd like to know how to exclude a folder in web/example.com. Can't get that to work either through the user directories exclusion.
will be fixed in the next version
Top

hedgehog90
Posts: 25
Joined: Wed Sep 09, 2015 7:19 pm

Re: Backup exclusions do not work
  • Quote

Post by hedgehog90 » Tue Oct 27, 2015 5:18 pm

Could you tell me how to fix it myself?
If I can't exclude these massive directories, I won't be able to use the backup function on my server.
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Backup exclusions do not work
  • Quote

Post by imperio » Tue Oct 27, 2015 5:40 pm

hedgehog90 wrote:Could you tell me how to fix it myself?
If I can't exclude these massive directories, I won't be able to use the backup function on my server.
only in new version
Top

mach
Posts: 77
Joined: Tue Oct 27, 2015 6:34 pm

Re: Backup exclusions do not work
  • Quote

Post by mach » Tue Oct 27, 2015 7:03 pm

backups all work in vesta ,1 domain is about 10mb ,its al to see what you have ,but it works automatic
i have delete my domain ,and have use the backup to put it back i see no problem in backup
Top

hedgehog90
Posts: 25
Joined: Wed Sep 09, 2015 7:19 pm

Re: Backup exclusions do not work
  • Quote

Post by hedgehog90 » Fri Oct 30, 2015 1:35 pm

I've fixed the problem, but being a bash noob it took up my entire morning

For other users experiencing the same problem where web directory exclusions aren't working, do the following:

nano /usr/local/vesta/bin/v-backup-user

Find the line:
xdirs="$(echo -e "${check_exlusion//:/\n}" |grep -v $domain)"

And replace it with
xdirs="$(echo -e "${check_exlusion//:/$'\n'}" |grep -v $domain)"

I also found the backup was producing an error with the domain.sh function 'get_web_config_brds'
I wrote my own templates that didn't use %domain_idn% so it couldn't find the relevant lines. Also I was storing it in a variable like so:
set DOMAIN_IDN=%domain_idn%

Anyway. Fixed now, but I don't appreciate the lack of help on here.
@imperio You could have just told me how to fix the web domain directory exclusion error considering how simple it was to fix.
Top

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

Re: Backup exclusions do not work
  • Quote

Post by skurudo » Fri Oct 30, 2015 2:13 pm

hedgehog90 wrote: but I don't appreciate the lack of help on here.
hedgehog90, sorry, but only humans on this forum. None of us is superhero, who know all answers. If you have some time, then try to help us and other users - answer and write on this forum too.
hedgehog90 wrote:@imperio You could have just told me how to fix the web domain directory exclusion error considering how simple it was to fix.
You can try to use some code from github..:

Code: Select all

      # Define exclude arguments
        exlusion=$(echo -e "$WEB" |tr ',' '\n' |grep "^$domain:")
        set -f
        fargs=()
        fargs+=(--exclude='logs/*')
        if [ ! -z "$exlusion" ]; then
            xdirs="$(echo -e "$exlusion" |tr ':' '\n' |grep -v $domain)"
            for xpath in $xdirs; do
                fargs+=(--exclude=$xpath/*)
                echo "$(date "+%F %T") excluding directory $xpath"
                msg="$msg\n$(date "+%F %T") excluding directory $xpath"
            done
        fi
        set +f
and below look at "User Directories"

https://github.com/serghey-rodin/vesta/ ... ackup-user
Top


Post Reply
  • Print view

11 posts
  • 1
  • 2
  • Next

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