basilmir

Q: How can I move mail data to a new OS X Server?

Hello,

 

I have two OS X Servers 2.2.1 on 10.8.3. Both are running and doing alright, but i can't use the migration assistant.

 

I need to move all mail accounts and data from one to another. I've already transfered Open Directory via the Archive Directory master command AND the wikis via http://support.apple.com/kb/HT5585

 

How can i do the same to Mail?

 

Thank you!

Posted on Apr 15, 2013 12:50 PM

Close

Q: How can I move mail data to a new OS X Server?

  • All replies
  • Helpful answers

  • by UptimeJeff,Solvedanswer

    UptimeJeff UptimeJeff Apr 15, 2013 1:28 PM in response to basilmir
    Level 4 (3,477 points)
    Apr 15, 2013 1:28 PM in response to basilmir

    The mailboxes can be moved by copying the contents of your mailstore, by default:

    /Library/Server/Mail/Data/mail

     

    The actual mailboxes are named with the user's GUID.

    If you migrated OD, then the GUIDs haven't changed, so this should be quite simple.

     

    Be sure to retain permissions, or reset them after:

     

    sudo chown -R _dovecot /Library/Server/Mail/Data/mail/

  • by basilmir,

    basilmir basilmir Apr 16, 2013 12:55 AM in response to UptimeJeff
    Level 1 (76 points)
    Apr 16, 2013 12:55 AM in response to UptimeJeff

    Doing what you recommended... now.

     

    ------------

     

    I also need to (re)create the local users with a specific GeneratedUID for each one.

     

    I used "dscl . -read /Users/USERNAME GeneratedUID" command to get the UID of the old local users.

     

    What is the best way to do this

     

    Create the user and then update the UID?

     

    OR

     

    Create the user while specifying the UID at creation time?

     

    What is the command for each, i can't seem to dig up anything on google?

  • by UptimeJeff,Helpful

    UptimeJeff UptimeJeff Apr 16, 2013 5:01 AM in response to basilmir
    Level 4 (3,477 points)
    Apr 16, 2013 5:01 AM in response to basilmir

    can you export the old local users from WGM, then import them into new server?

    Is your old server 'up'

     

    you could also export users from old server, then use find/replace on the text file to assisgn specific GUIDS.

     

    I would need to know more anout the history, what works, what doesn't work.. why the lateral transfer?

    What services did you use (where data exists that you need to retain)

     

    Jeff

  • by basilmir,

    basilmir basilmir Apr 16, 2013 6:44 AM in response to UptimeJeff
    Level 1 (76 points)
    Apr 16, 2013 6:44 AM in response to UptimeJeff

    Apparently when you archive the OpenDirectory master and recreate it on the new machine, the "local" users get transferred too.

     

    Ran into some issues with one user but i fixed them.

  • by Zero Six,

    Zero Six Zero Six Aug 28, 2013 6:20 PM in response to UptimeJeff
    Level 1 (0 points)
    Aug 28, 2013 6:20 PM in response to UptimeJeff

    So based on this, can I restore individual services by copying and setting proper permissions?

     

    (wiki, web, messages, calendar)

  • by basilmir,

    basilmir basilmir Aug 29, 2013 12:45 AM in response to Zero Six
    Level 1 (76 points)
    Aug 29, 2013 12:45 AM in response to Zero Six

    Technically yes. But you'd have to be some *nix hero to do it, i could never get my head around permissions.

     

    If you can use migration asistant to move everything to a new computer and then remove the users you don't need.

     

    OR BETTER YET (if the current system is working well)

     

    Use the server app to change the Service Data location to a usb hdd/stick (this will fix permisions) and then just move the Server.app to a new server, connect the usb hdd/stick to the new computer and start your copied Server.app