Join the community today
Register Now

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

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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:
    10:30 AM
    1.5.8
    Thank you so much.

    I follow them now. ;)
     
  4. Matt

    Matt Well-Known Member

    929
    415
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +671
    Local Time:
    1:30 AM
    1.5.15
    MariaDB 10.2
    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.
     
  5. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    9:30 AM
    Mainline
    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
  6. Kintaro

    Kintaro Member

    106
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    2:30 AM
    1.15.x
    MariaDB 10
    are you rsyncing centminmod's configurations too?
     
  7. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    9:30 AM
    Mainline
    10.2
    Domain vhost only.