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 Debian/Ubuntu
  • Search

Backup creates to many tempfolders

Debian/Ubuntu related topics
Post Reply
  • Print view
Advanced search
10 posts • Page 1 of 1
aumarov
Posts: 1
Joined: Fri Dec 02, 2016 5:43 am

Backup creates to many tempfolders
  • Quote

Post by aumarov » Fri Dec 02, 2016 5:48 am

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.
Top

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

Re: Backup creates to many tempfolders
  • Quote

Post by skurudo » Mon Dec 05, 2016 11:19 am

Please check /var/log/vesta -> backup log
aumarov wrote:By the way, I cannot check Let's Encrypt box as well.
How so? Did you get some error?
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Backup creates to many tempfolders
  • Quote

Post by skamasle » Tue Dec 06, 2016 8:10 pm

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
Top

donat
Posts: 39
Joined: Thu Jul 30, 2015 1:42 pm

Re: Backup creates to many tempfolders
  • Quote

Post by donat » Tue Jan 03, 2017 8:22 am

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?
Top

donat
Posts: 39
Joined: Thu Jul 30, 2015 1:42 pm

Re: Backup creates to many tempfolders
  • Quote

Post by donat » Mon Jan 23, 2017 10:00 am

Still have the problem. Is there anyone else whith this problem?

Any help is very appreciated.

Kind regards
Don
Top

Falzo
Posts: 60
Joined: Mon Mar 28, 2016 8:49 am

Re: Backup creates to many tempfolders
  • Quote

Post by Falzo » Thu Jan 26, 2017 3:34 pm

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 :(
Top

Falzo
Posts: 60
Joined: Mon Mar 28, 2016 8:49 am

Re: Backup creates to many tempfolders
  • Quote

Post by Falzo » Thu Jan 26, 2017 3:47 pm

just had another look into /usr/local/vesta/bin/v-backup-user where the things are done...

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
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:

Code: Select all

        # Backup ssl proxy config
        if [ ! -z "$PROXY_SYSTEM" ] && [ "$SSL" = 'yes' ] && [ ! -z "$PROXY" ]; then
but haven't tested that yet...
Top

donat
Posts: 39
Joined: Thu Jul 30, 2015 1:42 pm

Re: Backup creates to many tempfolders
  • Quote

Post by donat » Thu Jan 26, 2017 4:17 pm

You are my hero!

It seem's to work with this patch. Thanks a lot!

Kind regards
Don
Top

Falzo
Posts: 60
Joined: Mon Mar 28, 2016 8:49 am

Re: Backup creates to many tempfolders
  • Quote

Post by Falzo » Fri Jan 27, 2017 6:56 am

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...
Top

BaDTaG
Posts: 16
Joined: Sun Nov 22, 2015 12:22 pm

Re: Backup creates to many tempfolders
  • Quote

Post by BaDTaG » Sun Sep 17, 2017 4:21 pm

thanks still works. got this error and this fixed right up.
Top


Post Reply
  • Print view

10 posts • Page 1 of 1

Return to “Debian/Ubuntu”



  • 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