Results 1 to 22 of 22
  1. #1
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,932

    Question Mirroring/Imaging drive from one server to a new one?

    I currently have a dedicated server with a single hard drive in it with about 800 cPanel accounts. I am purchasing a new server with identical specs but will have 2 hard drives in RAID1 from the same data center.

    Is it possible to make an exact image of the first server to avoid any configuration loss on the new server? I have already spoke to the data center about moving the current IPs to the new server and I know moving the cPanel accounts can be done in WHM but I would like to preserve all of the server settings, configurations, and background scripts that I have running.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  2. #2
    Join Date
    Jun 2008
    Location
    UK
    Posts
    266
    it's possible, but you can also just copy every file from one to the other - particularly if its in the same DC where you should get good transfer speeds between them.

    the dc guys should be able to do it for you, if you ask them to.
    WebCertain - SEO, PPC, PR - The services you need to increase your site traffic. Specialists in over 35 languages and country-specific SEO! www.webcertain.com

  3. #3
    Join Date
    Aug 2008
    Location
    Shoreline WA
    Posts
    160
    I think you should be able to rsync it or something similar, once before the final, and then once with all the services shut off. Then you would need to do a little bit of cleanup, change any incorrect mention of the old drive setup you had, if you even copy those files in the first place. Well the details might get a little hairy, but if you work with someone familiar with the process, and make a good plan before hand, knowing what needs to be transferred, and how to handle the IP addresses, and various other configurations, this should be very possible. The only question I have is, what is the cPanel licensing tied to? As long as you can answer that, you should have your bases covered.
    Jonathan Kinney
    Data Systems Specialist
    Advantagecom Networks, Inc.
    http://www.simplywebhosting.com

  4. #4
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,932
    I'm coordinating this with the data center and will not wipe the old server until the new one is 100% online so I'll at least have a backout plan. The cPanel license is tied to the IPs but I will be purchasing 2 licenses (1 for the new server and 1 for the old server) and will continue using the old server.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  5. #5
    Join Date
    Mar 2009
    Location
    Chicago, IL
    Posts
    219
    I would stay away from trying to do an rsync of / on down unless your OS and patchlevels are *EXACTLY* the same. This can cause quite a few headaches really and is usually a paint to clean up.

    The safest and easiest method is to simply do the 'root account transfer' from one cPanel machine to the next. This will bring in and properly configure all users and keep things tiday. If you bring over the apache profiles from /var/cpanel/easy/profile/ (i might be off *just* a bit on that dir) then you can re-run /scrtips/easyapache and choose "last known good build" which will replicate your existing webserver setup.

    There's other methods for doing a big transfer, but that's probably the easiest for cPanel to cPanel.

  6. #6
    Join Date
    Jan 2005
    Location
    Scotland, UK
    Posts
    2,681
    Quote Originally Posted by SA-ChrisM View Post
    I would stay away from trying to do an rsync of / on down unless your OS and patchlevels are *EXACTLY* the same. This can cause quite a few headaches really and is usually a paint to clean up.

    The safest and easiest method is to simply do the 'root account transfer' from one cPanel machine to the next. This will bring in and properly configure all users and keep things tiday. If you bring over the apache profiles from /var/cpanel/easy/profile/ (i might be off *just* a bit on that dir) then you can re-run /scrtips/easyapache and choose "last known good build" which will replicate your existing webserver setup.

    There's other methods for doing a big transfer, but that's probably the easiest for cPanel to cPanel.
    Just as note providing it's the same os and arch it should be pretty safe to rsync and just exclude /boot , /etc/fstab, /dev and /lib/modules providing the session doesn't get interrupted all the libs should be replaced correctly and it should be pretty much a 100% exact copy like he is looking for.
    Server Management - AdminGeekZ.com
    Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
    WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
    Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com

  7. #7
    Join Date
    Mar 2009
    Posts
    83
    It is also worth noting that if the hardware is the same, then if the cpanel repository is the same, then everything _should_ be the same. You can also tighten the rsync to only include the files associated with the accounts.

  8. #8
    Join Date
    Mar 2009
    Location
    Chicago, IL
    Posts
    219
    Quote Originally Posted by Scott.Mc View Post
    Just as note providing it's the same os and arch it should be pretty safe to rsync and just exclude /boot , /etc/fstab, /dev and /lib/modules providing the session doesn't get interrupted all the libs should be replaced correctly and it should be pretty much a 100% exact copy like he is looking for.
    Not necessarily true, the kicker is in that "at the same patchlevel" part that I mentioned. For example, if you've got 2 CentOS 5.3 64 bit boxes, one a fresh installation and one that's been in production for a bit you're going to hit a *ton* of version mismatches, duplicate libraries, etc.

    Once you cross that line, you get to spend the better part of a day going through and cleaning out the duplicate packages, relinking libraries and the like. For example you'll have 2 different versions of every rpm that isn't the exact same release as the prior build.

    This truly is best left to a cPanel -> cPanel transfer and/or someone who knows the internals of the control panel enough to bring over only the pertinent portions of the setup, let cPanel fix up the few discrepancies left and keep the host OS intact.

    Also, let's not forget /etc/ with it's minefield of hardcoded IPs in network config and daemon configuration scripts, /var/cpanel/ with all the IPs of the users being stuck on the old IPs, things like that. Sure it's fixable, but it's tricky and probably more trouble than it's worth.

    edit: "fresh installation" could mean any different thing from different providers depending how they intall. From a burned CD, imaged version of the OS that's been partially patched, or someone who keeps their repos and their images constantly up to date.

  9. #9
    Join Date
    Jan 2005
    Location
    Scotland, UK
    Posts
    2,681
    Quote Originally Posted by SA-ChrisM View Post
    Not necessarily true, the kicker is in that "at the same patchlevel" part that I mentioned. For example, if you've got 2 CentOS 5.3 64 bit boxes, one a fresh installation and one that's been in production for a bit you're going to hit a *ton* of version mismatches, duplicate libraries, etc.

    Once you cross that line, you get to spend the better part of a day going through and cleaning out the duplicate packages, relinking libraries and the like. For example you'll have 2 different versions of every rpm that isn't the exact same release as the prior build.

    This truly is best left to a cPanel -> cPanel transfer and/or someone who knows the internals of the control panel enough to bring over only the pertinent portions of the setup, let cPanel fix up the few discrepancies left and keep the host OS intact.

    Also, let's not forget /etc/ with it's minefield of hardcoded IPs in network config and daemon configuration scripts, /var/cpanel/ with all the IPs of the users being stuck on the old IPs, things like that. Sure it's fixable, but it's tricky and probably more trouble than it's worth.

    edit: "fresh installation" could mean any different thing from different providers depending how they intall. From a burned CD, imaged version of the OS that's been partially patched, or someone who keeps their repos and their images constantly up to date.
    If you are rsyncing everything over, and only skip what I mentioned above, you are going to be on the exact same patch level as the old system, the libraries are going to be the same, everything about it will be the same.
    Server Management - AdminGeekZ.com
    Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
    WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
    Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com

  10. #10
    Join Date
    Mar 2009
    Location
    Chicago, IL
    Posts
    219
    Quote Originally Posted by Scott.Mc View Post
    If you are rsyncing everything over, and only skip what I mentioned above, you are going to be on the exact same patch level as the old system, the libraries are going to be the same, everything about it will be the same.
    Even files with hard coded IPs, i.e., network interfaces, gateway, apache configs, all his zonefiles, etc. I'm not arguing that it can't work at all, just saying that there's an easier more efficient solution working with the tools he already has at his disposal. If he rsyncs and excludes only what you mentioned, he's going to spend hours cleaning it up or have to hire an admin to handle it and pay a pretty penny.

    I've certainly used your method in the past and it works if you need it to bad enough or cleanly on very simple servers. But if he's doing an IP change (which I believe he is), then he's just going to spend more time fixing that up than if he'd done the good ole WHM transfer from server to server and took a nap.

    I think we could probably go back and forth on recovery solutions for awhile without necessarily seeing eye to eye. I'm only trying to give my .02 for the OP to be able to do a fast, safe transfer. No offense intended.

  11. #11
    Join Date
    Jan 2005
    Location
    Scotland, UK
    Posts
    2,681
    Quote Originally Posted by SA-ChrisM View Post
    Even files with hard coded IPs, i.e., network interfaces, gateway, apache configs, all his zonefiles, etc. I'm not arguing that it can't work at all, just saying that there's an easier more efficient solution working with the tools he already has at his disposal. If he rsyncs and excludes only what you mentioned, he's going to spend hours cleaning it up or have to hire an admin to handle it and pay a pretty penny.

    I've certainly used your method in the past and it works if you need it to bad enough or cleanly on very simple servers. But if he's doing an IP change (which I believe he is), then he's just going to spend more time fixing that up than if he'd done the good ole WHM transfer from server to server and took a nap.

    I think we could probably go back and forth on recovery solutions for awhile without necessarily seeing eye to eye. I'm only trying to give my .02 for the OP to be able to do a fast, safe transfer. No offense intended.
    Oh god, forget doing the rsync if he is changing the IP because you're right that would be alot of effort. From his post thought it sounds like he is keeping the IP's but just upgrading to a bigger server so rysncing is probably the easiest solution as it requires no work outside of the initial rsync command.
    Server Management - AdminGeekZ.com
    Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
    WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
    Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com

  12. #12
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,932
    Yup, the IPs are not changing (thanks for taking the time to read my posts Scott).
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  13. #13
    rsync would be the way to go, and no need to do it recursive from /. You simply need to copy over just the files that cPanel needs and the user dirs. Once done use the IP migration wizard to get all the sites on your new IPs. Then on the old server update the IPs in all the DNS zones to point to the new server using your find/replace command of choice.
    cPanel Hosting
    Site5.com - Best support in the hosting business!

  14. #14
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,575
    Another way could be boot new box from live cd/rescue, configure IP address, partition and format disks, rsync the whole / fom your original box, chroot, install grub, reboot.

    Done many many rsync copies of servers running cPanel.. never had any issues and it was much quicker and painless than doing cpanel account copies using whm or command line.

  15. #15
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,932
    Thanks for the heads up StevenG. I'm actually not going to be doing it now like I originally planned to though so it's in the hands of my data center techs.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  16. #16
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,575
    No worries, glad that you got some good folks willing and able to take care of it for you anyway.

  17. #17
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,932
    Heh, I'm hoping they're able to take care of it (they haven't failed me yet but up to this point they said copying the data wasn't possible until I pointed them to this thread). Fingers crossed.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  18. #18
    Join Date
    Apr 2009
    Location
    Dallas/FortWorth TX
    Posts
    1,703
    what about ghost image, or full HDD image replication ??
    <<< Please see Forum Guidelines for signature setup. >>>

  19. #19
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,932
    Care to ellaborate more? I'm new to this so I don't really have any knowledge of disk imaging or replication on a live server hard drive.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  20. #20
    Quote Originally Posted by JWeb2 View Post
    Care to ellaborate more? I'm new to this so I don't really have any knowledge of disk imaging or replication on a live server hard drive.
    That would be a software or hardware image of the old disk to a new disk, which could be placed in the new machine. Which I do not think will work in your case.
    cPanel Hosting
    Site5.com - Best support in the hosting business!

  21. #21
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,932
    I don't think so either but I'm willing to hear him out incase he knows something I don't.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  22. #22
    Ask the datacenter if they could use clonezilla or something similiar to image the old drive to the new drive. We've done this several times, and as long as the arch is close to the same you should be ok.

Similar Threads

  1. Mirroring live drive daily?
    By RelativeDesign-Jerret in forum Hosting Security and Technology
    Replies: 7
    Last Post: 03-24-2008, 02:58 AM
  2. Questions regarding backup services, drive mirroring
    By treoguy in forum Dedicated Server
    Replies: 3
    Last Post: 01-30-2007, 01:49 PM
  3. Hardware independent server imaging
    By kkropp in forum Hosting Security and Technology
    Replies: 3
    Last Post: 02-14-2006, 05:20 PM
  4. Drive mirroring in Red Hat Linux 6.1
    By pmak0 in forum Hosting Security and Technology
    Replies: 3
    Last Post: 06-07-2001, 10:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •