Skip to main content

Possible to upgrade CentOS 6.5 to 7 without total rebuild?

Comments

17 comments

  • cPanelMichael
    Hello, Directly upgrading an OS to a new major version is highly discouraged, and likely to result in several issues on the system. Ideally, you should provision a new server with the new version of the OS. Then, install cPanel, configure the server, and migrate the accounts from the existing system over to it via "WHM >> Transfer Tool". Otherwise, you'd need to backup your accounts to a remote destination, reinstall the OS and cPanel, and then restore the accounts from the backup archives. Thank you.
    0
  • SactoBob
    Hard to do an full re-install and xfer as mentioned when you have 100+ sites on their own IP. How do you migrate and keep them the same IP? Temporarily put all those IPs on an interface in the down state on the new server and move like that?
    0
  • cPanelMichael
    Hello, You can setup a new IP address on the destination server, transfer the accounts, and then use the
    0
  • SactoBob
    I don't think this would work for my circumstance. I need to keep all the websites on the same IP as I don't control DNS for some of them and I can't move their MXes to a new IP address either. So I need a migration path that would let me bring up a new cPanel on Centos 7, temporarily shutdown incoming email on the Centos 6 system, move all the sites to Centos 7 and keep them on the same IPs they were on the old system. I'm thinking as a VM I can put the same class C on an interface on the Centos 7 system in the down state, move the sites (making sure they are put on the same IP), then afterwards take the Centos 6 down and bring up the interface on the Centos 7 box? Sounds complicated, I hope I'm making myself clear!
    0
  • 24x7server
    Hi, Take a look at the below guide for the upgrade. TipsAndTricks/CentOSUpgradeTool - CentOS Wiki If it would have been my server, I will not go with the inplace upgrade, instead, what I would do take a fresh backup of the accounts on the server, then talk with the DC and arrange for a second hard disk on my server, get an CentOS7 install on it separately. Then I would ask the DC to swap the disk, so the current one goes as secondary and the new CentOS7 installed on as primary and then do either a crash drive recovery or full cPanel backup restoration... The most safest way..
    0
  • cPanelMichael
    Hello, We also document steps to ensure the same IP address is utilized at: How to Move All cPanel Accounts from One Server to Another - cPanel Knowledge Base - cPanel Documentation Thank you.
    0
  • SactoBob
    Hello, We also document steps to ensure the same IP address is utilized at:
    0
  • cPanelMichael
    On my cPanel systems I have all users on a 2nd (home2) drive. Would there be a way to do a fresh Centos 7 install on new server, then mount the home2 drive and only have to export/import cPanel configs from the centos 6 system to get everything back up and running rather then migrating one user at a time and dealing with each one that has their own SSL certs too?

    Hello @SactoBob, That's not a supported method of transferring the accounts, and would likely lead to configuration issues because several account-related configuration files are stored outside of the home directory. Is there a specific reason you prefer not to use "WHM >> Transfer Tool"? Are you concerned about the time it will take for the transfer to complete? Thank you.
    0
  • SactoBob
    Hello @SactoBob, That's not a supported method of transferring the accounts, and would likely lead to configuration issues because several account-related configuration files are stored outside of the home directory. Is there a specific reason you prefer not to use "WHM >> Transfer Tool"? Are you concerned about the time it will take for the transfer to complete? Thank you.

    Yes, time-wise and others. As I understand it, I'd need to stop some services on the old server while transfers are taking place. Mostly mail/exim so I don't get mail going to the wrong location. I guess I could leave apache running during this process? Also, every single user on my cPanel has their own IP(I have my own ASN/block and my own colo/servers), so there is a lot of work involved moving them back to original. About a dozen have their own multi-domain/SSL cert, which also appears is not transferred? And then moving to the firewall-cmd system, and other configs (which I expected). I guess I could have those already done too and ready to go. So mostly the time between transfers and moving every domain back to its original IP.
    0
  • dalem
    we have done what you have done quite a few times with 0 effect on customers . I do not know your exact setup Migrated from 6-7 using this method. Use at your own risk 1. Set up new centos 7 machine with matching config with one new IP in a different vlan just to facilitate the cpanel license (if you cant use a separate vlan you can shut down the IP alias's 2 add all IP's on your new machine (no traffic should flow to them because of the step above.) (if any of your sites use the shared ip set to the old IP without adding it to eth device) 3. transfer all accounts 4. set your IP's correctly 5. take a LVM snap shot of partitions on your old server your set up may be different syncing from live server should be ok as well 6. rsynced the /home --exclude=virtfs/ --delete options a. did it twice for good measure 7. disable MySQL server on new machine 8. rsynced /var/lib/mysql if you cant pull a snapshot shut your MySQL down temporarily on your old server 9. make sure MySQL server starts correctly and enable it 10. Up date your Main server IP to the Old IP on the new machine 11. take down the public network on your old machine 12. set your vlan correctly 13 reboot New server 14 rsync the the /home dir again --exclude=virtfs/ --delete options a. we had private IP's accessible if you don't you will have to add a different ip to the old machine and start the network.. I have done this at least 10 times with our own servers and client servers the only issue we had was we had to rebuild the eximstats (it was still using MySQL back then)
    0
  • dalem
    PS sense your using home & home2 rsync both
    0
  • cPanelMichael
    Hello @SactoBob, The steps provided by @dalem would ensure your accounts are transferred and any changes to the data post-transfer are synced to the destination server. SSL certificates are included as part of the data that's transferred over with WHM >> Transfer Tool, but you can manually install the SSL certificates post-transfer if they don't copy over for some reason (You can verify they exist post-transfer using WHM >> Manage SSL Hosts). Let us know if you have any additional questions, and keep in mind we are happy to help troubleshoot any issues that might arise during the transfer process. Thank you.
    0
  • SactoBob
    Doesn't the process in step 3 above (3. transfer all accounts) move all the SQL/SSL certs associated with each site? What happens with the DNS setup brought over from the current system? Will additional entries come over? We also have some sites where base domain is pointing elsewhere for hosting, but mail is here. Will that IP that is outside the subnet remain or does it get clobbered? I have a centos 7 system just about ready to go, only step i think is to shutdown exim/mail services, start the xfer, swap the ip subnets and bring the interface up (it's set to disconnected in it's vm config).
    0
  • cPanelMichael
    Doesn't the process in step 3 above (3. transfer all accounts) move all the SQL/SSL certs associated with each site? What happens with the DNS setup brought over from the current system? Will additional entries come over? We also have some sites where base domain is pointing elsewhere for hosting, but mail is here. Will that IP that is outside the subnet remain or does it get clobbered? I have a centos 7 system just about ready to go, only step i think is to shutdown exim/mail services, start the xfer, swap the ip subnets and bring the interface up (it's set to disconnected in it's vm config).

    Hello @SactoBob, 1. Yes, SSL certificates are included as part of the data that's transferred over with WHM >> Transfer Tool. 2. The DNS zones associated with the accounts are also included as part of the transfer and custom DNS entries are copied over. 3. IP addresses that match the IP address associated with the account on the source server are replaced with the IP address associated with the account on the destination server in the DNS zone that's created on the destination server. The custom records should not be modified. This is documented (including information about MX records) at: Transfer Tool - Version 68 Documentation - cPanel Documentation Note that there's currently an issue with the "Express Transfer" option that can result in the replacement of the custom "A" record for the domain name with the default IP address associated with the account. Thus, you may want to avoid using the Express Transfer option for now. You can read more about that issue at: cPanel transfer tool wipes custom A records? Thank you.
    0
  • SactoBob
    Thanks dalem. This will cut migration time way down. I've tested this with one domain and fudging my Windows host file to use the domain on the new computer and it looks fine. They have 25g of stored mail. Initial account transfer via cpanel took about 8 hrs, I really don't want to be down that long. With rsync and mysql move I think that time is cut to about an hour. Your method seems reasonable. All accounts created initially with transfer, the only thing changed after that are stuff in their /home and mysql DB, right? Thanks for the idea, -Bob
    we have done what you have done quite a few times with 0 effect on customers . I do not know your exact setup Migrated from 6-7 using this method. Use at your own risk 1. Set up new centos 7 machine with matching config with one new IP in a different vlan just to facilitate the cpanel license (if you cant use a separate vlan you can shut down the IP alias's 2 add all IP's on your new machine (no traffic should flow to them because of the step above.) (if any of your sites use the shared ip set to the old IP without adding it to eth device) 3. transfer all accounts 4. set your IP's correctly 5. take a LVM snap shot of partitions on your old server your set up may be different syncing from live server should be ok as well 6. rsynced the /home --exclude=virtfs/ --delete options a. did it twice for good measure 7. disable MySQL server on new machine 8. rsynced /var/lib/mysql if you cant pull a snapshot shut your MySQL down temporarily on your old server 9. make sure MySQL server starts correctly and enable it 10. Up date your Main server IP to the Old IP on the new machine 11. take down the public network on your old machine 12. set your vlan correctly 13 reboot New server 14 rsync the the /home dir again --exclude=virtfs/ --delete options a. we had private IP's accessible if you don't you will have to add a different ip to the old machine and start the network.. I have done this at least 10 times with our own servers and client servers the only issue we had was we had to rebuild the eximstats (it was still using MySQL back then)

    0
  • dalem
    Your welcome still to this day use a similar method to change out hardware but we skip the cpanel transfer and just and dd the blocks or if the partitions are not LVM will use r1soft. too many times used the old cpanel transfer method an got the old I missing emails/files ticket after a migration.This method is near real time. yes that's pretty much it home/MySQL ( server logs but who care about them). Just make sure your MySQL directory is frozen when you rsync it. We pretty much have this automated. just modified our custom Virtual server migration script (pull the migration commands) and modify them sightly for each server as the are not all net up the same.
    0
  • SactoBob
    Yeah, I figure I'll do a couple of rsyncs, stop all services and shutdown main nic (using temp vlan nic for xfers). Do another rsync and mysql db copy and bring up nic on new server that has my existing class C of aliases defined. About 15-30 minutes down instead of a complete transfer, great time saver!
    Your welcome still to this day use a similar method to change out hardware but we skip the cpanel transfer and just and dd the blocks or if the partitions are not LVM will use r1soft. too many times used the old cpanel transfer method an got the old I missing emails/files ticket after a migration.This method is near real time. yes that's pretty much it home/MySQL ( server logs but who care about them). Just make sure your MySQL directory is frozen when you rsync it. We pretty much have this automated. just modified our custom Virtual server migration script (pull the migration commands) and modify them sightly for each server as the are not all net up the same.

    0

Please sign in to leave a comment.