Time Machine optimization

daniel's Avatar


16 Mar, 2018 11:55 AM

Hi, i am using Time Machine to backup my laptop and everytime it needed to copy a few gigabytes of local.db even if i only changed one mail.

Finally i found a trick which would make performance so much better, it works, maybe the developers get an idea to improve the software and change the architecture.

What's the Problem ?
All Mails are stored in a file called "local.db" which is one huge file. Each time you change one email the whole file changes and Time-Maschine has to copy the whole thing which is stupid.

I moved the files where airmail stores emails (with all other files) to a sparsebundle.
Disk-Utility , Create Sparse Bundle. No Partition Expandable with huge size.
Then i mount it as a folder and put the mount in my login-items.

Now Airmail thinks this is a normal folder like before and behaves exactly the same.

But for Time-Machine it's now a folder with a few hundred 8MB files and each day
there are only a few MB in changes to backup.

Airmail Support told me a long time ago local.db cannot be optimized, but that's not true.
It's just a bad architecture. It only works if you have 5 emails in your mailbox.

My Sparsebundle Config:
See attachment.

i put it into the Library/Container Folder so that it is near to the old location.

i use this script in login-items
hdiutil attach ~/Library/Containers/it.bloop.airmail.beta11.sparsebundle -mountpoint ~/Library/Containers/it.bloop.airmail.beta11/

the sparsebundle gets mounted and just replaces the old folder and behaving the same, only for Time Machine now it's much better.

I hope this gives ideas and you can improve file-management of airmail.

i have hundreds of apps on my laptop and only airmail is going crazy with file usage.


  1. 1 Posted by daniel on 16 Mar, 2018 12:02 PM

    daniel's Avatar

    Oh, i use no partition, this screenshot , setting for disk-utility is better.
    The SparseBundle is expanding and only needs the space which is filled, with a tiny bit of overhead. It means if you have a 64GB Bundle, and store 10GB in it it will use 12GB or so on disk. You cannot resize a SparseBundle later, so choose it big enough. But it's possible to create a bigger Sparsebundle and just copy the contents.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • Screen_Shot_2018-03-16_at_12.49.15.png 38.6 KB
  • Screen_Shot_2018-03-16_at_12.50.33.png 29.4 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

29 Jun, 2021 10:59 AM
29 Jun, 2021 10:32 AM
01 Jun, 2021 06:34 AM
22 Apr, 2021 04:33 AM
21 Apr, 2021 06:18 AM