Fastest way to swap whole Cpanel to new machine

nyjimbo

Well-Known Member
Jan 25, 2003
1,136
1
168
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 ???
 
Last edited:

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
34
473
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
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,136
1
168
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 ??
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
34
473
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.
 

teakwood

Active Member
Jul 8, 2006
26
0
151
Sydney
chirpy said:
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.
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?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
34
473
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.
 

teakwood

Active Member
Jul 8, 2006
26
0
151
Sydney
Thanks, that was great

chirpy said:
You can use the script to convert all the accounts over to maildir and not lose anything. You cannot go backwards, AFAIK.
Thanks Chirpy, the conversion went well and neatly merged the mbox into the maildir files that came over from the previous host. :D