cPanel migration problem :: Addon domains - Files

Hello,

Virtualmin is not properly migrating addon domains in cpanel backup file. Example cpmove file : http://64.191.99.143/permalink/backup-6.28.2011_03-49-45_maindoma.tar.gz

In the above backup , I have just created a cpanel account with 'maindomain.com' backup file. Then tried to add domain1.com and domain2.com as addon domains. sub2domain1.domain1.com , sub3domain1.domain1.com are three subdomains for domain1 , similar subdomains are created for domain2 . park.com is parked on maindomain.com

And in each folder of these backups, there is a .files file which acts as the domain's files.

When trying to migrate using virtualmin :

1- DNS zones are not created correctly.There are many 'ignoring out-of-zone data ' errors when validating migrated virtual servers ... 2- Files are not migrated to addon domains ... 3- This info in migration log seems to be wrong : 'Creating sub-domain sub1dom1.domain1.com .. .. skipping, as not a sub-domain of maindomain.com or any other migrated domain'

cpanel create a subdomain in maindomain for each addon domain. Virtualmin tries to do similar job which is wrong. It is better to act each addon domain as a new virtual server.

Best regards Mostafa

Status: 
Closed (fixed)

Comments

Thanks!

Jamie will take a look at that. He's at the YAPC Perl conference right now, so it might be a little longer than usual before he resolves that.

Thanks for providing a link to an example backup file though, he'll be able to use that to get things fixed up.

Ok, I am taking a look at your backup file now ..

So in the original cPanel system, what type of domain was sub1dom1.domain1.com (and other sub-domains of domain1.com) ? Do they just show the same content as maindomain.com , like a Virtualmin alias domain?

The issue seems to be that Virtualmin's migration code is processing them too soon, before domain1.com has been created.

Mostafa's picture
Submitted by Mostafa on Wed, 06/29/2011 - 08:43

Hello,

sub1dom1.domain1.com is a subdomain #1 of domain1.com and has his own files. ( sub1dom1.files is representative of its files and is placed in the root folder of subdomain) . sub2dom2.domain1.com is another subdomain of domain1.com , ...

Please pay attention that cpanel create a subdomain in maindomain for each addon domain, then try to park the addon domain on the subdomain ! Virtualmin tries to do similar job which is incorrect ! It is highly recommended to act each addon domain as a new virtual server.

Best regards

Ok, thanks .. I see what is going on now.

So for sub1dom1 , does its HTML directory just contain a file called sub1dom1.files ?

Mostafa's picture
Submitted by Mostafa on Wed, 06/29/2011 - 12:41

Hi there Jamie,

Yes, I've created the file 'sub1dom1.files' in order to get sure if the files are copied to root directory after the migration or not.

Please try to validate virtual servers after migration. There are many 'ignoring out-of-zone data ' errors when validating migrated virtual servers ...

Best regards

Mos

Ok, I have fixes for all these issues, which will be included in the next Virtualmin release.

If you want to get a beta version to test and get your migration done sooner, please let me know ..

Mostafa's picture
Submitted by Mostafa on Thu, 06/30/2011 - 00:39

Hi there Jamie,

Please provide me the beta version to test it .

I have a migration which has about 50 domains/subdomains , So very good for testing purposes !

Best regards

Mos

Sure .. are you running Virtualmin GPL or Pro, and on which Linux distribution?

Mostafa's picture
Submitted by Mostafa on Fri, 07/01/2011 - 00:40

GPL on debian 6 and also another GPL on centos 5.5

Automatically closed -- issue fixed for 2 weeks with no activity.

Mostafa's picture
Submitted by Mostafa on Thu, 09/01/2011 - 15:31

I've tested the migration script and it's working but not vice versa , please :

1- You've simply changed apache DocumentRoot path for addon domains and subdomains. For example consider an subdomain called "sub1.maindomain.com" with "/home/maindoma/public_html/sub1" document root in cpanel, you've just migrated the public_html and then set the DocumentRoot of subdomain's virtualhost to "/home/maindoma/public_html/sub1" . It would be very best if the structure of virtualmin applied here. I mean that you move the subdomain's root folder to :(/home/maindoma/domains/sub1.maindomain.com/) and rename it to public_html, so the final path will be : /home/maindoma/domains/sub1.maindomain.com/public_html .

This applies to addon domains too !

2- When I run a validation check , there are some permission problem for the mail folders. It's best to have a fixpermission script and then apply it to the migrated virtual-server .

If these two tips got applied to virtualmin, It will be bloody brilliant , as always !