Page 1 of 1

Backup restore bug

Posted: Tue Mar 29, 2016 12:01 pm
by dakkar
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.

Re: Backup restore bug

Posted: Tue Mar 29, 2016 2:12 pm
by skurudo
Rebuild web for user after restore, this might help.

Re: Backup restore bug

Posted: Wed Mar 30, 2016 5:30 pm
by dakkar
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.

Re: Backup restore bug

Posted: Thu Mar 31, 2016 9:56 am
by mehargags
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

Re: Backup restore bug

Posted: Sun Apr 03, 2016 1:23 am
by dakkar
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.

Re: Backup restore bug

Posted: Sun Apr 03, 2016 3:36 am
by dakkar
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.