Page 1 of 2
Backup exclusions do not work
Posted: Sun Oct 18, 2015 4:56 pm
by hedgehog90
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!
Re: Backup exclusions do not work
Posted: Sat Oct 24, 2015 4:12 pm
by hedgehog90
I've been patient, still no replies... Really?
Re: Backup exclusions do not work
Posted: Sat Oct 24, 2015 4:15 pm
by imperio
OS on your server is Ubuntu ?
Re: Backup exclusions do not work
Posted: Mon Oct 26, 2015 11:40 am
by hedgehog90
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.
Re: Backup exclusions do not work
Posted: Mon Oct 26, 2015 12:02 pm
by imperio
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
Re: Backup exclusions do not work
Posted: Tue Oct 27, 2015 5:18 pm
by hedgehog90
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.
Re: Backup exclusions do not work
Posted: Tue Oct 27, 2015 5:40 pm
by imperio
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
Re: Backup exclusions do not work
Posted: Tue Oct 27, 2015 7:03 pm
by mach
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
Re: Backup exclusions do not work
Posted: Fri Oct 30, 2015 1:35 pm
by hedgehog90
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.
Re: Backup exclusions do not work
Posted: Fri Oct 30, 2015 2:13 pm
by skurudo
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