0

We have a Mac OS X Server v5.3.1 that has been failing, but we have many good backups. As a matter of fact, the internal HDD had failed and we are currently running off of an image on a bootable external drive. We've built a new instance of server, successfully imported users and groups. The new machine must have the same IP address and hostname in order for this to work. DNS and Certificates are setup properly.

Apple provided this guidance, but we're not having much success:

1) To backup the mail folder: tar -czvf mailbackup.tar.gz /Library/Server/Mail/Data

You still see the file “mailbackup.tar.gz” appear inside the home folder >of who you are currently logged in as.

2) Move the file over to the new machine. You can put on a portable >external, usb thumbdrive, or store it on a sharepoint elsewhere on the >network. No special commands here

3) To restore the folder:

tar -xvpf mailbackup.tar.gz

It knows the path already so there’s no need to specify a path.

The first issue is that Apple's guidance extracts the archive to the user library, not the system library at ~/Library/Server/Mail/

We did modify the extraction command so that the data was properly extracted to: /Library/Server/Mail with the resulting files at: /Library/Server/Mail/Data

The problem is that although the data compares in location, file size, dates and permissions, all mailbox data is lost for the Local Network User. Mail client can receive and send however. (All old mailbox data is ignored or missing)

We can switch between servers by simply swapping the ethernet cable between servers.

Apple is saying "Moving mail data between servers is not directly supported by Apple Enterprise support" so they are of no further help.

What are we overlooking ?

Peter

Peter
  • 1

1 Answers1

0

Here's what I discovered.

Apple's guidance to use tar -czvf mailbackup.tar.gz /Library/Server/Mail/Data while logged in as the local admin copied the Folders for each user, but did not copy the contents of the folders or preserve the permissions (empty folders).

I had to switch to the root user:

sudo
su
password:
tar -czvf mailbackup.tar.gz /Library/Server/Mail/Data

My mail archive is now 8.8GB compared to 226MB previously. I'm in the process extracting this archive to the new server.

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43