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 Web Server
  • Search

Backup restore bug

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
dakkar
Posts: 6
Joined: Sun Mar 27, 2016 10:01 pm

Backup restore bug
  • Quote

Post by dakkar » Tue Mar 29, 2016 12:01 pm

Still collecting more info so I can dump it here, but here's a possible bug I discovered.


WHen restoring a backup to a different server with a different username than source username, everything went fine, except for some reason /etc/nginx/conf.d/vesta.conf automatically loaded an httpd.conf as well as an nginx.conf, which caused nginx to throw this error:

nginx: [emerg] unexpected end of file, expecting ";" or "}" in /home/****/conf/web/httpd.conf:35

httpd.conf doesn't use } or ;. Removing the extra include in /etc/nginx/conf.d/vesta.conf fixes the problem.

It very well may be that the nginx/apache relationship is very different on the two servers.

If you are here because you had a similar issue, you do NOT remove any nginx.conf from /etc/nginx/conf.d/vesta.conf, there just shouldn't be any httpd.conf's listed in these includes. ONLY nginx.conf files are loaded in this file.. also do not mess with the httpd.conf throwing the error. Its just not suppose to be processed by nginx which that vesta.conf is telling it to



This issue aside, the restore process works extremely well. Brilliantly adjusts doc roots, DNS and other paths.
Top

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

Re: Backup restore bug
  • Quote

Post by skurudo » Tue Mar 29, 2016 2:12 pm

Rebuild web for user after restore, this might help.
Top

dakkar
Posts: 6
Joined: Sun Mar 27, 2016 10:01 pm

Re: Backup restore bug
  • Quote

Post by dakkar » Wed Mar 30, 2016 5:30 pm

Replicated, rebuilt user, it doesn't remove the errorous include. Probably because the scripts for the restore already rebuild the user since the user name and other info could be different in the backup.

The problem is solved on my end just pointing it out for others that might get similar errors.

I just see no reason an httpd.conf would load in the nginx conf includes file like it does in this case.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Backup restore bug
  • Quote

Post by mehargags » Thu Mar 31, 2016 9:56 am

imperio, skurudo
is there a Verbose mode for restore command ? I've also encountered many a times that restore command simply doesn't work, sonetimes it just says archive invalid.

I hope there is a verbose mode or log we can check detailed
Top

dakkar
Posts: 6
Joined: Sun Mar 27, 2016 10:01 pm

Re: Backup restore bug
  • Quote

Post by dakkar » Sun Apr 03, 2016 1:23 am

There is no way to verbose output. However nearly everything that can go wrong that ends the process stores errors in one of these places:

/var/log/vesta/system.log
/var/log/vesta/backup.log
/var/log/vesta/auth.log
/var/log/vesta/nginx-error.log
/usr/local/vesta/php/var/log/php-fpm.log

When your restore ends for invalid archive there is probably more info in the system.log.

For more error logs see this: https://vestacp.com/docs/#config-log-lo ... hel-centos

Be sure to look under the log paths for your OS distro.

Like I've said previously their restore process is actually quite good at detecting differences in the backup vs what the current system has in its configs.
Top

dakkar
Posts: 6
Joined: Sun Mar 27, 2016 10:01 pm

Re: Backup restore bug
  • Quote

Post by dakkar » Sun Apr 03, 2016 3:36 am

UPDATE:

skurudo, you were right.

v-rebuild-user DID need to be run after all of this but there was another problem, that could possibly be OS related not VestaCP related.

After the restore, the permissions were incorrect. I had to chown root:user * in the /home/user/conf/web/ folder in order for restore to work properly.

I replicated all the same steps, fixed the perms, ran the rebuild and boom, everything worked without editing confs to remove erroneous nginx includes.
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Web Server”



  • 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