I have a system with fairly small internal storage (500GB) so I have attached a reasonably quick external storage device (256GB) that will be constantly mounted. To free up space on the internal storage, I would like to move some data to the external can be formatted as either "MacOS Extended Journaeld"/HFS+ or APFS. The Mac itself is running macOS 10.14 "Mojave".
The simplest thing to move would be the Photos.app library as that can be done by just option-launching the program and selecting the library on the external, however the library is too large (around 300GB), and constantly growing, so that is not an option. Splitting the library into two is an option but then involves futzing with two libraries, and working with images in two libraries is not very well supported by Photos.app.
Email storage on the other hand is just the right size! However I am unsure exactly which folders are important, and the best way of providing the linkage so that everything works properly and is not frequently broken.
The following folders in the ~/Library folder seem to be Mail.app related:
~/Library/Mail ~/Library/Mail Downloads ~/Library/Containers/com.apple.mail
~/Library/Mail Downloads seems to be old with nothing inside it dated after 2013 - I gather that sometime in the 10.9 Mavericks era this was moved to inside
~/Library/Containers/com.apple.mail folder, so it can probably be ignored or even deleted after I look through it to make sure there is nothing of value inside.
So that leaves the two other folders. If I copy them to
and then make symbolic links at the expected places in the
~/Library folder will everything continue to work properly?
Would macOS aliases be preferred over Unix symbolic links? I think that if the name of the external-drive is ever changed, the symbolic links will break but macOS aliases would continue to work. The downside to an alias is that some lower-level Unix stuff does not know how to deal with the macOS alias. With that said, it looks like
~/Library/Containers/com.apple.mail is filled with all sorts of macOS alias files, so Mail.app does seem to be able to handle all of those.
This discussion Access to ~/Library/Containers/com.apple.mail/Data/ denied makes me think that Mojave's "entitlements" might make it challenging to move the entire
~/Library/Containers/com.apple.mail folder. Perhaps I should move the
~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads folder instead, since it seems to contain the majority of the data in the
So my inclination is to copy the two folders
~/Library/Mail ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads
/Volumes/external-drive/Mail-Storage/Library/Mail /Volumes/external-drive/Mail-Storage/Library/Containers/com.apple.mail/Data/Library/Mail Downloads
and replace the local folders in
~/Library with macOS aliases to the folders in
One extra thing to do is to make sure that the alias at
which normally points to the folder
properly resolves to the folder
which it might not do if it is not corrected.
Finally, for recent macOS System security policy, Mail has no right to read and write on an external disk unless it is authorized in System Preferences > Security and Privacy > Privacy > Full disk access (or is there a way to just give it access to "Removable Volumes" rather than everything?)
Is that the best way to do this? Have I missed any issues?
I guess I should encrypt the external-drive so the data is safe if someone walks off with the device using either the Finder to encrypt all the data currently on the device, or using Disk Utility.app to reformat the device with encryption - details on both are here among other places.
Thanks in advance for any insights you can offer.