7

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

/Volumes/external-drive/Mail-Storage/Library/Mail
/Volumes/external-drive/Mail-Storage/Library/Containers/com.apple.mail

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 ~/Library/Containers/com.apple.mail folder.

So my inclination is to copy the two folders

~/Library/Mail
~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads

over to

/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 /Volumes/external-drive/Mail-Storage/Library/.

One extra thing to do is to make sure that the alias at

~/Library/Containers/com.apple.mail/Data/Library/Mail

which normally points to the folder

~/Library/Mail

properly resolves to the folder

/Volumes/external-drive/Mail-Storage/Library/Mail

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.

4
  • I had a similar difficulty with moving photos to my external drive (slightly too large and growing relatively fast), so I went with my iTunes library which is smaller and grows slower. It is as easy to move as Photos.
    – dwightk
    Feb 16, 2019 at 15:53
  • 1
    Oh, I hadn't thought of that. I think however that this user already has the iTunes library moved to a only-attached-when-needed external drive - it may get consolidated onto the new external however.
    – j-beda
    Feb 16, 2019 at 16:04
  • 2
    Might I suggest an external 1TB SSD connected via USB3? The Crucial/Micron MX500 or BX500 are available in that capacity for about US$100 these days.
    – jdmc
    Oct 21, 2019 at 16:35
  • That is what I am doing for clients with USB3 machines - moving the entire home directory to the external is very straightforward and a bit of Velcro is almost as convenient as the tiny thumb drives. Unfortunately, not as good of an option with the USB2 machines.
    – j-beda
    Oct 22, 2019 at 20:14

2 Answers 2

2

Photos

however the library is too large, and constantly growing, so that is not an option.

I don't understand the reasoning behind this. I assume you have more storage on your external drive than your internal drive. It's the perfect thing to move. New photos should be added to the external drive. Here is what apple is saying on the subject. https://support.apple.com/en-us/HT201517

Mail

I'd pick ln command so macOS above the Unix layer will not know that you moved the folders.

SymbolicLinker is a tiny contextual menu plugin that, once installed, allows any user to create symbolic links to files inside the Finder.

encryption

Is up to you. It's harder to recover data that's encrypted. Your data is less protected. You have to evaluate what your data is worth out in the wild. I never take my computer outside my house, so it's as safe as all my other stuff. I have an off site backup too.

backup

Do not forget to backup all you external data.

2
  • 1
    Thanks hs - the external (256 GB) is actually smaller than the internal (500 GB) and the Photos library is already 300GB, thus the mail move. I agree that in the majority of cases, moving Photos first is the best option.
    – j-beda
    Feb 16, 2019 at 15:37
  • 1
    I think you are correct that a symbolic link would work for anything that Mail.app or other software might ask of it, but since this is for a fairly non-technical user, I worry that a change in name of the external is likely to unintentionally break the linkage, while a macOS alias would continue to work.
    – j-beda
    Feb 16, 2019 at 15:49
1

If you want to save your Mail Library on an external disk, you surely can move the ~/Library/Mail folder to such a disk then make a symbolic link from ~/Library/Mail to your specific new location (such as /Volume/yourdisk/Mail).

But that would be not enough, Mail would never be able to start if you did not allow Mail to access all the disks. With the new macOS System security policy, Mail has no right to read and write on an external disk unless you authorized it in System Preferences>Security and Privacy>Privacy>Full disk access.

If you do not explicitly give full disk access to Mail, then you would get System Policy: Mail(38010) deny(1) file-read-data for instance and Mail would not have the right to read into the library. Mail would then hang up and you would have no error message to understand what's happening.

2
  • Have you actually tried this?
    – nohillside
    Nov 18, 2021 at 12:26
  • That is a very good point about "Full Disk Access" with macOS versions after Mojave. Any thoughts about the content in ~/Library/Containers/com.apple.mail ? For me at least this is all fairly academic as the user has updated the machine to one with more storage.
    – j-beda
    Nov 19, 2021 at 12:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .