Monday, February 15, 2016

How to move your Mac Mail storage location in Mac OSX

Hi, so I like to separate my system drive from my data drive, that way I can always return my operating system back to a 'gold image' by restoring a time machine backup, performed after a system rebuild and before the Mac even touches the nasty web. My strategy for installing new applications is first to satisfy myself it is something I really, really want, and then restore my clean image, install the application, then take a fresh image which becomes my new gold image.

However, in order to work that strategy, you need to reconfigure such that your everyday data is on a separate drive, otherwise when you restore your image you will loose documents etc.

An example of this is your email stored in the Mac Mail application. The answer is you use Symbolic Links. Here is a step by step guide:

  • Confirm that the current mail location is ~/Library/Mail, you can do that by holding OPTION and selecting GO from the task bar. This should open the current user Library folder. You should see a folder there called 'Mail'
  • Copy that folder to where you would like it to be stored. For me it is in a folder called 'Data' which is within a drive named 'Data' (Weird, I know). So the path (for me) will be:
/Volumes/Data/Data/Mail
  • Rename that folder to something like 'Mail_Old'.
  • Enter the following command:
sudo ln -s /Volumes/Data/Data/Mail ~/Library/Mail

This will then create a symbolic link called 'Mail' exactly where the application expects to find it, and when the application follows that link it will lead to your data drive.

Remember, all case sensitive and if you are normally a Windows user, watch out for which slashes you are using.

Cheers!

No comments:

Post a Comment