Move accounts between servers except mail
Hello,
I have a dedicated server with some accounts, but 3 of them have, together, more than 1 Tb of IMAP mail messages. Both servers are 100 mbits only, and will take a lot of time to transfer.
My ideia is transfer the accounts except the "mail" folders. Reason: I can rsync the mail folders to a separated folder on the new server before transfer everything else and change the DNS. Everyday I can rsync only changes until the migration day. And then do a final rsync in the migration day, replace the "empty" folder with that rsync'ed, transfer everything else (website, mysql, email accounts (passwords), DNS and so), restoring the latest version of /home/user folder.
Any ideas how to accomplish this? I need to do everything in one sunday, so the Transfer Tool for immediate change is not possible.
Thanks.
-
Hello @Rogerio, The easiest approach would be to uncheck Copy Home Directory for those three accounts when using WHM >> Transfer Tool to copy the accounts to the destination server. Then, use rsync to manually transfer the data from the home directories for those accounts (/home/$username/) as needed and in the order you prefer. Thank you. 0 -
Hello @cPanelMichael great, question: unchecking "Copy Home Directory" will not affect any data, like mail passwords, MySQL databases, etc? Just a rsync and set owner is enough? Rogerio 0 -
HI @Rogerio MySQL databases are stored in the MySQL directory not in /home/$user so they would be unaffected. I would ensure that when you perform the rsync you include all folders besides mail if you want to do that separately. 0 -
Thank you, @cPanelLauren 0 -
Hello @cPanelMichael and @cPanelLauren Worked, thank you. But I had to set new GID and UID to each folder on /home/user. How can I fix owner and permissions since the UID/GID are differents in the new server? And, doing this way, it didnt create /etc/apache2/logs/domlogs/user folder (symlinked on /home/user). Thanks. 0 -
Hi @Rogerio You should be able to use chown or usermap/groupmap as described in the rsync man page: --usermap=STRING custom username mapping --groupmap=STRING custom groupname mapping --chown=USER:GROUP simple username/groupname mapping0
Please sign in to leave a comment.
Comments
6 comments