Quota used increases when importing CPanel servers

Hi

I have been migrating quite a few domains over from CPanel and have found that they are using a lot more quota once migrated compared to when on CPanel.

I have done some checking and found that the servers that I have migrated end up with a mail folder in there home folder (e.g. /home/virtualserver/mail/). This folder seems to be a copy of the mail that was being used in CPanel but Virtualmin does not use it anymore as far as I can tell as the mail is in the ../homes folders.

Can you tell me can I delete these folders as then their quota will be back to normal?

Also is there anything else I can delete?

Status: 
Closed (fixed)

Comments

The /home/virtualserver/mail directory typically contains additional folders for the domain owner..

Does this account for all the difference in disk usage though? Or are there perhaps files somewhere outside the domain's home directory that are using up a lot of space?

Yes the /home/virtualserver/mail folder accounts for all the difference in the quote usage.

Does Virtualmin use the /home/virtualserver/mail folders at all?

New servers created in Virtualmin from scratch do not contain the the /home/virtualserver/mail folder.

In a standard Virtualmin install, all mail is stored under /home/virtualserver/Maildir .

You are correct that the mail directory comes from cPanel .. however, during the migration process all files under it should be moved to the correct directories under /home/virtualserver/homes/mailbox/Maildir .

In your migrated domains, what files are you seeing left over in the mail directory?

In the /home/virtualserver/mail/domainname/mailbox/cur is the emails that were in the users mailboxes when the servers was transferred over, they also were put in the correct place during the transfer so it is as thought they were copied to the correct location and then not deleted.

I have checked for 1 user who has not cleared the emails and the emails are in both locations with only emails received since the merge in the /home/virtualserver/homes/mailbox/Maildir/cur folder

That is surprising, as messages in a mailbox's mail directory should get moved to the new location, not just copied.. at least, that is what the current code does.

Would it be possible for you to email me a sample cPanel backup for which you have seen this problem, to jcameron@virtualmin.com ? I'd like to try re-producing this issue on my test systems..

Thanks for the backups - I see the cause of the problem now, and will fix it in Virtualmin 3.74.

If you want an earlier fix, I can email you an update to /usr/share/webmin/virtual-server/migration-cpanel.pl .

Please the backups helped, I know what is like finding something when you don't have an example.

If you could email me the update as I have a few more to transfer.

Am I safe to delete the /home/virtualserver/mail folders from the imported servers?

Yes, you could just delete that directory. I will send you an update though ..

Thanks Jamie

I have received the update.

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