personally, I don't bother with the migration tools... too often it gets messy.
I like a very clean install and I like to know exactly what was moved and to where.
- install clean 10.8, apply all updates 10.8.2 etc.
- install Server.app 2.2
- Verify DNS is good.
At this point, you have a nice clean install.
Clone it, so if anything goes bad, you can easily get back to this point.
- Setup OD
- migrate users (in most small biz environments, I just do an export of users/groups and deal with resetting pws)
(a little extra work, but can be cleaner in the end)
- Setup sharepoints, permissions
- Configure/Enable Mail
- Mailboxes can be moved quite easily because 10.6 and 10.8 both use dovecot. The difference though is that 10.8 names each user mailbox with their GUID not their shortname. In a typical mac server environment, I just copy these to new server, rename them with user GUID then reset permissions. Before you do this, you can check mail on the 10.8 server with an imap client, then look in the mailstore so you see how perms and the guid are setup. Copy old mailboxes over to new mailstore with the same name/perm scheme.
- Setup everything else.
(I'm not a ports user, so can't comment on that)
I wish I was smart enough to comment on TigerKR's lilst which looks great, but I am encountering a challenge in migraating mail data. Again, a 10.6.8 Server to 10.8.2 Server. I cannot seem to find the mail files on the server. The only location can find for the mail is /var/spool/imap/dovecot/mail but what I see are:
drwx------ 10 paul mail 646 Jan 21 14:28 C0021751-513E-4A3B-8829-F8AA4989FF15
Uet all the documentation says that the mail files should be under shortnames. How do I migrate these and attach them correctly? Just like you say above but renaming with guid and ignore the fact that the directories have such odd names?
On 10.6, each mailbox is named by the user's GUID.
Each user mailbox has its owner set to the user, so in Paul's example above
user=Paul is named: C0021751-513E-4A3B-8829-F8AA4989FF15
Going from 10.6 yo 10.8:
If you exported/imported users (so that their GUID is preserved), then you can copy those mailboxes to the new server.
On 10.8, all mailboxes are owned by _dovecot, so you'll want to run
sudo chown -R _dovecot /Library/Server/Mail/Data/mail
* adjust to your path
Thank you for your advise!
Hmm… I have 200+ users (each user has two short names - reverse address and standard email, example: com_apple_steve and firstname.lastname@example.org). I definately don't want to have passwords reset.
I don't think a nice clean install is what I want. I want minimal downtime, and all (or at least most) of my settings and all of my data setup to use automatically / immediately.
Jeff, are you suggesting that using the migration tools won't work? Do you (or anyone else) have any experience with 10.6 -> 10.8 using the migration tools?
I guess I'm looking for experiences from people who have both done the migration route, and the manual route (specifically for mail and web services).
I recently went from 10.7 server to 10.8 server. Migration tool did not work at all.
Had to basically do what UptimeJeff posted.
I haven't used ports for a while after switching to this http://mxcl.github.com/homebrew/
However if you follow the steps in this thread you don't need to install MySQL.
The email migration is pretty straightforward like UptimeJeff said as well.
I used this command to move it. Takes a few minutes if your mailboxes are a few gigabytes.
Run this command from the 10.8 server and it will do a full sync from the old server to the new server.
sudo dsync -u username -f mirror username@IP_of_old_server
EDIT - The username specified in the above command is you user's usernames.
For example: sudo dsync -u Bob -f mirror Bob@IP_of_old_server
Would sync Bob's email from the old server to the new server.
That's it for email, no permissions checks or changes needed after this.
Message was edited by: cellcore
How did you get this to work? Firstly is asks for a password - adding 'dsync -u <remoteserveradmin>' allows it to accept the remote users mailbox password but then it returns an error saying it could not access a non-existant location in the /Network directory on the remote server.
Any more hints on how you got this to work? I have the weekend to rebuild a corrpted server with backup issues and have c.50 large Dovecot mailboxes to move to a new machine....
Many thanks for any help
Thank you Jeff - I have the problem of file size to confront - but right now that is a quality problem. The real route of the problem is Time Machine just doesn't backup OSX10.8 (2.2.1) Servers properly across the LAN (in my case a NAS box with Time Machine emulation). I have learnt this the hard way with corrupted user accounts - restoring the server wholesale results in hundreds of issues stopping all server services working properly and I cannot just restore user accounts to a rebuilt server using TM.
Hence I have recreated the user accounts on the rebuilt server but because OSX assigns them different GUIDs (which are used to identify mail files) and hence I cannot just copy the mailboxes across and expect the rebuilt user accounts to access them. I need to somehow sync or being across the data to the rebuilt accounts.
Maybe I am missing an easy way to do this but haven't yet found it! dsync sounds like a possible solution if I can get the syntax right.
Any hints very welcome!!
you can still simply copy...
you'll need to have a list of old-server Name/GUID and new server Name/GUID.
rename each mailbox to proper guid
Get a list of name/guid on each server with:
For the local directory
dscl . -list /Users GeneratedUID
For a shared directory
dscl /LDAPv3/127.0.0.1 -list /Users GeneratedUID
This should be much faster than a imap migration
Don't alter the command I posted with different usernames, it will cause problems later on.
Make sure ssh is enabled on the old server.
If your admin accounts are the same across both servers then you will be fine with sudo. If not then it is best to run it as root as it will use the user you are running the command under to access the old server.
Thank you Cellcore
I have done a clean install of Server 10.8.2 on a new machine and have my sick Server 10.8.2 running with ssh enabled. Admin accounts are identical (username and password). A carbon copy of the user CLHouse has been created on the new machine.
I get the following error
hds001:~ NickAdmin$ sudo dsync -u CLHouse -f mirror CLHouse@192.168.1.3
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
dsync(root): Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: No such file or directory
dsync(root): Fatal: User lookup failed: Internal error occurred. Refer to server log for more information.
Any ideas on what I am missing?
Okay dumb error - I didnt have the mail service running on the rebuilt server.
I now get:
hds001:~ NickAdmin$ sudo dsync -u CLHouse -f mirror CLHouse@192.168.1.3
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).
dsync-local(CLHouse): Error: read() from worker server failed: EOF
However I do not know what password it is seeking - not the NickAdmin password (identical on both machines) or the password for CLHouse user (identical on both machines). ssh access is enabled for all users on the old server.
This is the problem I originally encountered yesterday.
You'll need to create the users on the new install before running dsync.
You may want to run - sudo passwd root - on the old server.
Enter in a password for the root user and then use that on the second password prompt.
The first password prompt will be for you sudo command on the local server then it will ask for a password on the remote server - which I think will be the root users password that you setup using the sudo passwd root command.