Want to subscribe to topics you're interested in?
Become a Member

When I copy host data to other vps server?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by karistuck, Jun 1, 2014.

Tags:
  1. karistuck

    karistuck Member

    43
    2
    8
    Jun 1, 2014
    대한민국
    Ratings:
    +3
    Local Time:
    3:17 AM
    1.5.8
    Today I was move to host data from 1 srv to 2 srv. Two server installed centminmod already. than I move to file with rsync.

    But I have many vhost domain.

    I must type every domain add vhost on centmin mod in 2 srv?

    or

    Some other way?

    plz teach me some thing.

    Thank you for watching

    :)
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,702
    6,707
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,009
    Local Time:
    4:17 AM
    Nginx 1.13.x
    MariaDB 5.5
    You should be able to just rsync the Nginx vhost directory for the Nginx vhosts at /usr/local/nginx/conf/conf.d/.

    @RoldanLT and @Matt have probably moved servers with Centmin Mod many times as well so they may have specific tips as well :)
     
  3. karistuck

    karistuck Member

    43
    2
    8
    Jun 1, 2014
    대한민국
    Ratings:
    +3
    Local Time:
    3:17 AM
    1.5.8
    Thank you so much.

    I follow them now. ;)
     
  4. Matt

    Matt Moderator Staff Member

    689
    319
    63
    May 25, 2014
    Sheffield, UK
    Ratings:
    +442
    Local Time:
    7:17 PM
    1.7.1
    MariaDB 10
    Yes, I've moved servers a couple of times now. I initially install centminmod the same as usual to get the webstack set up, and then sync across the existing vhost config files (along with the SSL directory for the certificates). This should work without issue, as the directory structure for centminmod installs shouldn't be any different on the 2 servers.
     
    • Like Like x 1
  5. RoldanLT

    RoldanLT Well-Known Member

    3,869
    945
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,284
    Local Time:
    2:17 AM
    1.11
    10.2
    Planing of moving to a new host?
    1. Install the latest CentMin Mod beta on the new server (with 99% the same software you use on the old server, same version of php, nginx, mariadb, memcached, ngx_pagespeed)
    2. I usually rsync the two important directory (/usr/local/nginx/conf/ and /home/nginx/domains/) So no need to re enter all the vhost/domain one by one.
    3. Dump all the DB on the old server into a single folder then rsync/scp the folder to the new server then import the db.
    4. Change to the new server ip using your OS host file so that you can test all the site if it's working fine without affecting other users/visitor of your site
    5. When everything works on the new server, all the domains should works also. Close all your site on the old server by redirecting all the request to a maintenance page. It maybe your facebook page.
    6. Finally rsync again (/usr/local/nginx/conf/ and /home/nginx/domains/) you should have just a few files to grab on.
    7. Export again all the db from the old server then re-import on the new server(all of this is done via ssh using rsync and mysql dump)
    8. Check all your website on the new server, be sure to set the new servers IP and the domain on your host file.
    9. Reboot the server to fresh up the system :)
    10. Then finally change your domains dns ip, it maybe dns made easy, namecheap dns or cloudflare dns(I myself use it :) )

    That is a lot of steps to do but I find it the most secure and reliable way :)
    Usually I've have done all of this 25 minutes maximum.
    But I only got two websites, a wordpress site and a XenForo Forum with 150K members and 435K post, 400 to 600 visitors at a time, 6GB+ Forum files, 1GB database.
    The downtime/closing the forum for final steps takes only 5 minutes I think :)
     
    Last edited: Jun 1, 2014
    • Like Like x 2
    • Informative Informative x 1
  6. Kintaro

    Kintaro New Member

    9
    1
    3
    Dec 2, 2016
    Ratings:
    +2
    Local Time:
    8:17 PM
    1.9.10
    MariaDB 10
    are you rsyncing centminmod's configurations too?
     
  7. RoldanLT

    RoldanLT Well-Known Member

    3,869
    945
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,284
    Local Time:
    2:17 AM
    1.11
    10.2
    Domain vhost only.
     
    • Informative Informative x 1