Page 1 of 2

Move Vesta CP to another host

Posted: Thu Jun 26, 2014 10:50 pm
by lifeforce
Hi,

Firstly I want to thank you for a fantastic CP. I moved around 50 websites across from ISPconfig and the performance is markedly improved, plus I love the simpicity of Vesta.

I would like to migrate everything to a new VPS host, what would be the best way to manage this?
I was thinking a clean install on new host, then copy over the websites and import the databases? Is that all there is to it?
The OS will be the same.

Also what is the Vesta database that contains all the panel information called? I can't seem to determine that.

Thanks kindlly
Matt

Re: Move Vesta CP to another host

Posted: Thu Jun 26, 2014 11:20 pm
by ivanh

Re: Move Vesta CP to another host

Posted: Thu Jun 26, 2014 11:57 pm
by lifeforce
Perfect! thank you :)

Re: Move Vesta CP to another host

Posted: Fri Jun 27, 2014 10:59 am
by imperio
Hi, lifeforce
in the next time please read our documentation before opening a new topic

Best regards

Re: Move Vesta CP to another host

Posted: Tue Jul 01, 2014 3:28 am
by lifeforce
Hello,

I followed the documentation in regards to moving to a new server, but when I run
v-restore-user admin admin.2014-*-*.tar on the new server, it stops with the following error

"Error: nginx restart failed"

If I try and restart nginx manually, it displays the following

"nginx: [emerg] unexpected end of file, expecting ";" or "}" in /home/admin/conf/web/httpd.conf:1157
nginx: configuration file /etc/nginx/nginx.conf test failed"

httpd.conf looks identical on both servers, the only difference being the IP address,

Please advise?

OS is CENTOS 6.5 64 bit in both cases.

This is output from /var/log/vesta/error.log

2014-07-01 07:12:50 v-restore-user admin admin.2014-07-01.tar [Error 3]

There is no backup.log in that directory

service nginx configtest produces:

nginx: [emerg] unexpected end of file, expecting ";" or "}" in /home/admin/conf/web/httpd.conf:1157
nginx: configuration file /etc/nginx/nginx.conf test failed


The backup contains, web, DNS, email and databases.

Kind Regards
Matt

Re: Move Vesta CP to another host

Posted: Tue Jul 01, 2014 6:44 am
by lifeforce
Hello,

I re-installed the OS on the new VPS and followed the same procedure for backing up and restoring Vesta CP and this time it worked! Not sure why as I did not do anything different, but the backup.restore process worked like a charm.

The only thing I needed to edit was the IP addresses for the DNS entries, to be consistent with the new server IP. Everything else appeared as it was on the old platform.

It really is a fabulous hosting panel you have provided here :)


Kind Regards
Matt

Re: Move Vesta CP to another host

Posted: Mon Dec 22, 2014 5:12 am
by izumin
lifeforce wrote: "nginx: [emerg] unexpected end of file, expecting ";" or "}" in /home/admin/conf/web/httpd.conf:1157
nginx: configuration file /etc/nginx/nginx.conf test failed"
Matt
I have the same situation on my move.

Code: Select all

nginx: [emerg] unexpected end of file, expecting ";" or "}" in /home/admin/conf/web/httpd.conf:205
But it should be nginx.conf if nginx can not start. Also bakups restoring not fully. After script gets error it break. And in /home/backups/ there is .tmp files for each user witch restore process started but not finished successfully. And in CP there is users and web (no mail or db restored).

Ok. Guys from neighbor topic tells that can be include.
So we have /etc/nginx/nginx.conf witch have include /etc/nginx/conf.d/*.conf
In a folder /etc/nginx/conf.d/ we have 3 files aaa.bb.vvv.gg.conf status.conf vesta.conf (aaa.bb.vvv.gg witch is your host ip) in a aaa.bb.vvv.gg.conf file we have everything ok. In a status.conf is also everithing ok. vesta.conf have several includes:
include /home/admin/conf/web/httpd.conf;
include /home/cv/conf/web/httpd.conf; ##where cv is user
include /home/admin/conf/web/nginx.conf;
include /home/admin/conf/web/snginx.conf;
And on old server in the same config file i don`t have first line, so i commented it temporary

Code: Select all

[root@point conf.d]# service nginx configtest
nginx: [emerg] open() "/home/cv/conf/web/httpd.conf" failed (2: No such file or directory) in /etc/nginx/conf.d/vesta.conf:2
then i commented second line in this config

Code: Select all

[root@point conf.d]# service nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
and now it is work fine for me.

Re: Move Vesta CP to another host

Posted: Thu Mar 05, 2015 5:06 am
by Spooney
THANK YOU izumin, that solved my import problem too! (commenting out the include line in /etc/nginx/conf.d/vesta.conf which wasnt there in the original server.)
Good job, thanks for taking the time to post this!

Re: Move Vesta CP to another host

Posted: Tue May 24, 2016 4:34 pm
by batence
I think VestaCP Team should fix that bug, also If they can improve php to v7, which is 73% faster than php 5.x, and 6.x will never released.

Re: Move Vesta CP to another host

Posted: Mon Jun 06, 2016 10:06 am
by canoodle
i have the same problem on a fresh hetzner debian 8.4.0

old-server: Linux@Hetzner.de 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u1 i686 GNU/Linux
new-server: Linux@Hetzner.de 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux

Code: Select all

service nginx configtestnginx: [emerg] unexpected end of file, expecting ";" or "}" in /home/admin/conf/web/apache2.conf:1054
nginx: configuration file /etc/nginx/nginx.conf test failed

systemctl status nginx.service -l
‚óŹ nginx.service - LSB: Stop/start nginx
   Loaded: loaded (/etc/init.d/nginx)
   Active: failed (Result: exit-code) since Mon 2016-06-06 10:10:15 CEST; 1min 41s ago
  Process: 12091 ExecStop=/etc/init.d/nginx stop (code=exited, status=0/SUCCESS)
  Process: 12432 ExecStart=/etc/init.d/nginx start (code=exited, status=1/FAILURE)

Jun 06 10:10:15 domain.de nginx[12432]: nginx: [emerg] unexpected end of file, expecting ";" or "}" in /home/admin/conf/web/apache2.conf:1055
Jun 06 10:10:15 domain.de systemd[1]: nginx.service: control process exited, code=exited status=1
Jun 06 10:10:15 domain.de systemd[1]: Failed to start LSB: Stop/start nginx.
Jun 06 10:10:15 domain.de systemd[1]: Unit nginx.service entered failed state.

when the backup resides in

Code: Select all

/home/backup/admin.2016-06-06.tar
and i do a:

Code: Select all

/usr/local/vesta/bin/v-restore-user admin /home/backup/admin.2016-06-06.tar
i get: Error: backup /home/backup/admin.2016-06-06.tar is not valid

so the correct folder for the backups to be in is /backup

Code: Select all

mv admin.2016-06-06.tar /backup/; # move backup in the right folder
 /usr/local/vesta/bin/v-restore-user admin admin.2016-06-06.tar; # start restore of the backup
================= SULUTION?

Code: Select all

vim /etc/nginx/nginx.conf;

in the last line it says:

Code: Select all

    # Wildcard include
    include             /etc/nginx/conf.d/*.conf;
check out vesta config file

Code: Select all

vim /etc/nginx/conf.d/vesta.conf;
which reads like:

Code: Select all

include /home/admin/conf/web/nginx.conf;
include /home/admin/conf/web/snginx.conf;
# include /home/admin/conf/web/apache2.conf; <- comment this out
# include /home/admin/conf/web/sapache2.conf; <- comment this out
retest config:

Code: Select all

service nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@domain /etc/nginx/conf.d # /etc/init.d/nginx start
[ ok ] Starting nginx (via systemctl): nginx.service
============ still Problem:

the MySQL databases were restored... but they do not show up in the VestaCP backend... straaaange :-D