The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fastest way to swap whole Cpanel to new machine

Discussion in 'General Discussion' started by nyjimbo, Jun 24, 2006.

  1. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    I know there are a hundred threads on how to move accounts from one machine to another but I have 400+ accounts on a box with 40 gigs of "/home" data and cant do this one by one. I looked at this about a year ago but gave up due to concerns but I think I really have to do it now.

    I want to migrate a old Freebsd 4.x box to a new Freebsd 5.x box. The new machine is built and ready to go, but I dont want to switch IP's or do stuff over the network. ALL of our
    machines are in house and our drives are on swappable enclosures so I can unmount our "/backup" drives, yank and insert them into another box, power up and remount and voila, the backup drive with anything is on the new machine ready for restores.

    What I want to do is copy all /home data, mysql and ALL cpanel related stuff to the swappable backup drive and then physically move it to the new Freebsd box (both will be running the same versions of cpanel/whm). We do normal cpanel controlled backups as well as "mount point" tar backups (/var,/home,/usr,/root) onto the backup drive so we can do anything needed with restores.

    So if I do a Cpbackup of all the cpanel related files and then just restore on the new box will that do it or will I still have to go into the new machine and do alot of tweaks ?. I mean will it get all little things like httpd.conf, valiases, logs, etc ???
     
    #1 nyjimbo, Jun 24, 2006
    Last edited: Jun 24, 2006
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    There are a few ways:

    1. You could use this post from DigitalN:
    http://forums.cpanel.net/showpost.php?p=166997&postcount=7

    This will give a nice copy of the original

    2. The less nice one is to restore from backups as you mentioned, but it's potentially more messy:
    http://forums.cpanel.net/showpost.php?p=253694&postcount=2

    This is cleaner, but you may miss some custom mods if you have any

    Note: There may be changes needed to the above links for FreeBSD since they're likely to assume a Linux environment
     
  3. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    I just realized that the old server is using the old pop3 mail format (mbox?) with the cppop and the new machine seems to have installed the courier-imap or "maildir" format.

    Anyone know if a cpanel full backup of an older mail format and then restored to a newer maildir format will work ?. Does Cpanel do some kind of mail transmogrification or something or do both machines need to be running the same mailbox format/standard ??
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The restore process should convert it over to maildir. If it doesn't just run /scripts/convert2maildir and there's an option to convert any remaining mbox files which will switch them over to maildir.
     
  5. teakwood

    teakwood Active Member

    Joined:
    Jul 8, 2006
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sydney
    I've just converted some accounts from a server which had maildir to one which has mbox . . . so naturally their old mail is not showing.

    Can I convert a half-and-half system like this using that script, or will I lose things?

    Also, the mail files in the "cur" directory from the old site have the old server's name appended. Does that need to be changed?
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can use the script to convert all the accounts over to maildir and not lose anything. You cannot go backwards, AFAIK.
     
  7. teakwood

    teakwood Active Member

    Joined:
    Jul 8, 2006
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sydney
    Thanks, that was great

    Thanks Chirpy, the conversion went well and neatly merged the mbox into the maildir files that came over from the previous host. :D
     
  8. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    At one stage I know that cpanel backups (and copy operations) didn't copy Mailman lists, not sure if this is still the case, but you may want to figure that into your calculations.
     
Loading...

Share This Page