Migrating individual accounts from one MiaB to another

I know Mail-in-a-Box has an extensive migration guide, and it works pretty flawlessly to be fair - however I have quite a large one with a few accounts, and am always creating new accounts etc - and need to upgrade to the latest OS version.

So what I’m thinking is, if I setup a new box, latest OS, start creating new accounts on the new server and do more of a ‘phased transition’, how easy / seamlessly can I move the accounts on the old server over to the new one? As far as I’m aware a backup / restore is totally inclusive, and not individual as the two systems would have separate security keys etc.

Thanks in advance for any tips :slight_smile:

What you are contemplating can be done, of course … but it would be quite labor intensive. You’d really be much better off doing a full backup/restore migration all in one shot.

Is there a reason that you are thinking of doing this? Are you wanting to eliminate unused accounts, perhaps? or is it something else?

Keep in mind that it is not possible to receive mail split between two different mail servers so you’ll only be able to receive mail to the accounts on the old server or the new server at one time. There are exceptions to this but they are outside of the scope of MiaB.

Share more insight to your thought process and I can offer ideas…

Yes, you can gradually stage a new miab server while an existing one is running, and change the DNS to switch to your new box when you are ready. I’ve done this multiple times myself, with the assistance of rsync. I do not use miab backup, so have never relied on its capability when I have moved from one VPS to another.

Basically, you want to selectively setup accounts on your new miab and migrate data (mail) from the older server. Rsync from /home/user-data/mail/mailboxes/yourdomain.com/theuser/ to the same directory on the new box. If you want everything, you can rsync from the /home/user-data/ level. There are a few files that contain keys you’ll want to exclude if you intend to keep them unique on the two boxes.

I tend to leave the old box running for a while afterwards because mail will continue to flow in until DNS changes have had the opportunity to change globally (24hrs). You can run rsync over again and it will add missing files to your new box. Decommission your old miab when you are satisfied that everything is located on the new box.

Awesome - thanks for the insights both.

Just to give more information, I know you can’t receive email from a single domain on two separate mail servers, however I meant mainly different domains, rather than splitting boxes.

The main reason I’m even contemplating this is because I don’t have the time to migrate everything over to a new server (deal with user issues, any configuration changes as I’m needing to change the hostname of the server for other reasons).

I know I need to migrate over to a new version of the OS and perform them upgrade ASAP, however in the meantime I’m moving some huge mailboxes onto MiaB, and was wondering whether it’d be easier to transfer straight to a new one and migrate the other domains over at a later stage - rather than setting up the huge inboxes on the old box and migrating everything at a later date.

Yes, indeed this is very possible. :slight_smile:

Given the additional information that you have provided, what you want to do does make sense now. I think it is important to look at a few things though … if the existing accounts are not ‘huge’ in comparision to the new mailboxes that you will be moving over then copying them over time using rsync as @tkforbes suggests or using IMAPSYNC online makes sense as well. As you said you need to establish a new hostname for the MaiB, you have another reason to do what you mentioned.

I do not know really if it will make that much difference transferring straight to the new instance of MiaB or via the old instance as in either case you need to migrate something. If you follow @tkforbes path though you will avoid any potential issue with backup restoration as you will not be doing a back up restoration - but the negatives will be having to create all the mailboxes again and then syncing the mails. So time and effort wise that may be more involved.

In the end, I think it is half dozen of one, six of the other. There are pros and cons with either way you proceed. You either need to set aside the time to do one mass move (2-3 hours assuming few issues) or do it in stages over time. There are other considerations as well such as IP reputation. You will be starting over with building IP reputation for the sending mail server, but that may be immaterial if you have a low outgoing volume of mail. There is also the cost of running 2 VPS’s, but this is likely a minor consideration.

Either choice you make should be a good one. Just keep in mind that there are variables either way to think about.

Hi guys,

Thanks all for the input - you are right it’s six of one and half a dozen of the other, and hearing that I’m not missing something obvious or a clear way through, at least it justifies the question in the first place! :slight_smile: I’m thinking I may actually just continue using the old version, and migrate in a month or so time.

Thanks again - much appreciated!

Keep in mind that if you migrate only a part of your domains, all the users have to reconfigure there mail clients to a different host.

In my case, i rented a second VPS, tested the procedure, verified everything, kept this one as a backup and upgraded my primary VPS.

Migration was done in less then two hours, with the option of falling back to the secondary one. (I have external DNS).