We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
Backup creates to many tempfolders
Backup creates to many tempfolders
I am using VestaCP for several years now. Last Friday, the panel was autoupdated. From that day I am facing problems with my VPS. I have investigated it and found out that VestaCP is trying to make backup (I usually do once a day) and system is creating large number of temp folders, but not zipped back up file. In one or two hours, these temp files occupying all free space on my hdd. Can you take a look to your backup script? By the way, I cannot check Let's Encrypt box as well.
Re: Backup creates to many tempfolders
Please check /var/log/vesta -> backup log
How so? Did you get some error?aumarov wrote:By the way, I cannot check Let's Encrypt box as well.
Re: Backup creates to many tempfolders
If you get a lot of tmp.xxxx dirs in /backup
maybe can be caused because:
1- You not have enough space to do a full backup
2- You maybe have corrupted databases and backup stop whit error
First option is very frecuent
maybe can be caused because:
1- You not have enough space to do a full backup
2- You maybe have corrupted databases and backup stop whit error
First option is very frecuent
Re: Backup creates to many tempfolders
We have the same problems with backup.
There are a lot of tmp.xxxx files in /home/backup, thil the disk is full...
After deleting this tmp.xxxx files, I have a disk usage around 28%.
In the backup.log there are some error messages, but I can't evaluate, what is wrong:
egrep: /usr/local/vesta/data/templates/web/nginx/.stpl: File oder folder not found
wc: /usr/local/vesta/data/templates/web/nginx/.stpl: File oder folder not found
Error: can't parse template /usr/local/vesta/data/templates/web/nginx/.stpl
In this folder I have several files ending with .stpl but no file or folder only named as .stpl
After that message, the backup is looping and filling up my disk...
Is it a bug?
There are a lot of tmp.xxxx files in /home/backup, thil the disk is full...
After deleting this tmp.xxxx files, I have a disk usage around 28%.
In the backup.log there are some error messages, but I can't evaluate, what is wrong:
egrep: /usr/local/vesta/data/templates/web/nginx/.stpl: File oder folder not found
wc: /usr/local/vesta/data/templates/web/nginx/.stpl: File oder folder not found
Error: can't parse template /usr/local/vesta/data/templates/web/nginx/.stpl
In this folder I have several files ending with .stpl but no file or folder only named as .stpl
After that message, the backup is looping and filling up my disk...
Is it a bug?
Re: Backup creates to many tempfolders
Still have the problem. Is there anyone else whith this problem?
Any help is very appreciated.
Kind regards
Don
Any help is very appreciated.
Kind regards
Don
Re: Backup creates to many tempfolders
yes, I can reproduce that.
it seems that this is caused if you have nginx+apache2 installed, then deactivate proxy for a (sub)domain but have ssl enabled. haven't found it yet, but it looks like if there is a check missing when grepping the the templates throughout backup-process, because proxy off isn't a problem with also ssl turned off. also you can see that this only occurs on grepping an stpl while missing the name for the proxy (because it's deactivated, there is no such name).
as a workaround you might want to make sure, that you activate the reverse proxy on every domain which is using ssl... actually I don't have the time for digging deeper into a real solution :(
it seems that this is caused if you have nginx+apache2 installed, then deactivate proxy for a (sub)domain but have ssl enabled. haven't found it yet, but it looks like if there is a check missing when grepping the the templates throughout backup-process, because proxy off isn't a problem with also ssl turned off. also you can see that this only occurs on grepping an stpl while missing the name for the proxy (because it's deactivated, there is no such name).
as a workaround you might want to make sure, that you activate the reverse proxy on every domain which is using ssl... actually I don't have the time for digging deeper into a real solution :(
Re: Backup creates to many tempfolders
just had another look into /usr/local/vesta/bin/v-backup-user where the things are done...
there you'll find two blocks:
while the first one is backing up the non-ssl config, the second one is doing so for ssl if available.
if I get this right, in the first block it checks if we are on a proxy-system (e.g. nginx+apache) and if we use that proxy (aka the var will hold the template name). in the second block it also checks first for the proxy-system and after that if ssl is enabled. yet the check for using the proxy itself is missing.
I'd suggest first line of that second block has to look like:
but haven't tested that yet...
there you'll find two blocks:
Code: Select all
# Backup proxy config
if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
get_web_config_lines $tpl_file $conf
sed -n "$top_line,$bottom_line p" $conf > conf/$PROXY_SYSTEM.conf
fi
# Backup ssl proxy config
if [ ! -z "$PROXY_SYSTEM" ] && [ "$SSL" = 'yes' ]; then
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
get_web_config_lines $tpl_file $conf
sed -n "$top_line,$bottom_line p" $conf > conf/s$PROXY_SYSTEM.conf
fi
if I get this right, in the first block it checks if we are on a proxy-system (e.g. nginx+apache) and if we use that proxy (aka the var will hold the template name). in the second block it also checks first for the proxy-system and after that if ssl is enabled. yet the check for using the proxy itself is missing.
I'd suggest first line of that second block has to look like:
Code: Select all
# Backup ssl proxy config
if [ ! -z "$PROXY_SYSTEM" ] && [ "$SSL" = 'yes' ] && [ ! -z "$PROXY" ]; then
Re: Backup creates to many tempfolders
You are my hero!
It seem's to work with this patch. Thanks a lot!
Kind regards
Don
It seem's to work with this patch. Thanks a lot!
Kind regards
Don
Re: Backup creates to many tempfolders
you're welcome. as it seems the same problem is mentioned here: https://github.com/serghey-rodin/vesta/issues/1035 , I will put a backlink there...
Re: Backup creates to many tempfolders
thanks still works. got this error and this fixed right up.