Over the last couple of weeks I’ve noticed that my hourly Time Machine backup on my Mac Pro has been backing up almost 2GB of data every time it runs. I couldn’t for the life of me figure out what could be changing that much data each hour and Time Machine is less than helpful when you try to find out exactly what is being backed up each time. It will only tell you what the total size is of the files being backed up. Now, normally this wouldn’t be too big of an issue. However, in my case, I have Time Machine on 7 different Macs in the house backing up to a 1TB Time Capsule. Total free space just keep getting lower and lower so I started worrying when I got down to about 20% free space on the Time Capsule.
After doing some Google searches, I ran across a Perl script named timedog that you can use to compare the contents of one backup to the one just previous to it. By default it starts at the latest backup and compares it to the previous one. Using timedog I was able to see the exact list of files backed up and their timestamps and file sizes. What I learned from that was pretty shocking. A file in /Users/<username>/.dropbox named dropbox.db was being backed up each time and it’s file size was 1.9GB–which was almost exactly the size of my hourly backups. A bit of research determined that this file is the index cache for the files that are sync’d to DropBox and their various revisions.
Most people reported their index files to be between 30MB and 70MB so I knew right away that this was out of the ordinary. I began trying to figure out why my index was so large. I use Skype heavily for business calling while I’m at home and I have a plugin that I use to record calls for later reference. I had noticed that the Dropbox icon would start trying to sync the recording file as soon as I started the call (rather than waiting until after the call was over and no more data was being added to the file). I don’t know this for sure, but my theory is that Dropbox would see the file as changed, make an entry in its index and begin trying to sync the file to Dropbox’s servers. Then, since the call recorder plugin was still adding things to the file, Dropbox would see it as changed from the last time it checked it and start the process all over again. If Dropbox is checking even once per second, you can imagine how many database entries this resulted in over the last few months of using Dropbox and the call recorder.
I wound up doing three things to fix the issue. First, I stopped the Dropbox service and deleted that dropbox.db so that it could be recreated without all those extraneous revision history entries. Next, I then moved the target folder where the call recorder saves calls to a location outside of what Dropbox syncs to the servers (having decided that I didn’t want those files eating up the space on my free Dropbox account). Finally, I went into Time Machine preferences and excluded the .dropbox folder from Time Machine backups. That fixed the issue of backing up 2GB of data every hour, but didn’t do anything to reclaim any of the space on my Time Capsule that had been taken up. I eventually went into Time Machine, deleted all previous backups of the .dropbox folder and happily watched several dozen GB of free space show up again.
In the end, this was kind of an edge case, perfect storm combination of issues that caused this behavior. I’m assuming that most people wouldn’t have both the call recorder plugin installed and have it saving to a folder sync’d by Dropbox, but that’s what happened for me. It took a while to track down the specific combination of things that were causing the behavior, but at least it is taken care of now.