Backup 2.0: Troubleshooting a partial backup failure

Posted by Pierre Igot in: Macintosh
July 29th, 2004 • 5:14 am

I’ve written about Apple’s Backup application before. It’s one of the things you get as part of the .Mac package. I’ve discussed the reliability problems with version 1.x and version 2.0.0. Most of these problems have been fixed in the latest update (version 2.0.2).

Unfortunately, that doesn’t mean that using the application is trouble-free. There can be further problems if anything goes wrong during the backup process. Today, for example, my scheduled backup (to an external FireWire hard drive) started in the background at 3 pm as usual. A few minutes later, the application’s icon started bouncing in the Dock, requiring my attention.

I switched to it, and got a pretty useless alert message telling that the backup had failed for “one or more items” and advising me to launch the application for more information.

So I launched the application to take a look at the log, using the “Show Log” command in the “File” menu.

The application took forever to open the log, but finally did. And sure enough, the entry for today’s log was in red with the mention “(Partial)” indicating that the program was unable to back up some of the items. But which ones?

Well, your guess is as good as mine. As indicated, the alert didn’t give me any clues. So I started looking at the log for today itself. The trouble is, it’s displayed in a single-column text field titled “Report” on the right-hand side of the “Log” window. The single column consists of a list of thousands of lines, one for each item backed up by the application. All you can do is scroll up and down the list. And the format of each line is as follows: It starts with the full path to the backed-up item, and then that path is followed by a dash and a word indicating the status of the backup for this particular item, i.e. “Success” (the item was backed up successfully) or “Unchanged” (the item was not backed up again because the file is unchanged compared to the last backup).

This makes it pretty much impossible to find which items were not backed up properly in case of a failed (“Partial“) backup. My backup, for example, includes thousands of items. The log report is sorted alphabetically, and since each item in the list starts with the path, it’s sorted by path. There is no way to sort that list by status in order to isolate these items that have a status word that is something other than “Success” or “Unchanged“. There is also no “Find” command to search the log in Backup, so I figured I’d try to save the log as a text file and search through it using a proper text editor such as BBEdit.

The interface for saving the log as a text file is extremely poor. There’s no “Save” command in the “File” menu. All there is is a “Save As Text File…” button all the way down in the bottom-right corner of the window. But this button gives you no indication regarding what will be saved — the individual log for a given day selected in the “Backup Log” column on the left-hand side, or all the logs?

Well, my guess is that Backup attempts to save all the logs in one single file. Why do I say that? Because when I click on that “Save As Text File…” button, Backup gives me a “Save As” dialog box in which the default name for the resulting text file is “Backup Activity Log.txt“, without a date. And when I actually click on the “Save” button, I get the spinning beachball and the application becomes completely unresponsive. I’ve waited for several minutes, to no available. The application stops responding. My guess is that the log file it is attempting to save as a text file is just too big. As I said, I don’t know how many thousands of items my daily backup includes, and then Backup has a log for every single day in the past months, which multiplies the number of lists it’s trying to save by 30. I guess it’s just too much for it.

So in effect I had no way of determining what exactly has failed in my backup using the normal Backup application interface. Since the alert didn’t give me any clues, except to say that “one or more” files were not backed up properly, I had no idea. And I was not about to start reading through that list of thousands of items trying to find a line that ends with something other than “Success” or “Unchanged“.

At this point, I decided to try and find that log file “manually”. Surely it was saved somewhere in the Library folder in my home folder. I first went to the Logs folder inside the ~/Library folder, but there was no sign of it there. It would probably have been too intuitive for Apple to put in there!

I ended up locating it by doing a search for “backup” in the ~/Library folder. The log file is actually in a ~/Library/Preferences/Backup/ folder! And sure enough, the main log file (Backup.log) weighs 85 MB on my machine. I opened it with BBEdit and it took a good 30 seconds.

Of course, it was now raw data that I was looking at, not user-friendly at all. However, the format seems pretty straightforward. The first line of the log indicates the type of backup (on external hard drive in my case), and then there is one line per item, which starts with “B::“, followed by the full path for the item, followed by “::2000” or “::2001” in most cases.

I suspect that “2000” is for “Success” and “2001” is for “Unchanged”, although it might be the opposite. So I decided to try and look for a line that ended in something other than “::2000” or “::2001“.

This time, since I was in BBEdit, I could make full use of its advanced grep-based searching capabilities. I used the following grep pattern

::200[^01]r

to find a line ending with “::200” followed by something other than “0” or “1”. And sure enough, BBEdit found a line ending with “::2005“. I was not surprised to see that the item with the error was actually a Word document attached to an email message in one of my INBOX mailboxes in Mail’s folder. I found the corresponding line in the log in Backup and there it said “Skipped” and the line was highlighted in red.

Why was I not surprised? Because I’ve already experienced problems with the Backup application and Mail in the past. In fact, I am pretty sure that the whole problem here is just a variation of the same problem I described in that previous blog entry. Instead of saying that it couldn’t backup this particular file, Backup just told me that the backup had failed for “one or more” files at the end of the process.

Unfortunately, the reason for the failure is not clear. In my previous blog entry, I said that it seemed to be related to the fact that I had previously opened the attachment from Mail by double-clicking on its icon in the e-mail message. But I haven’t opened this particular attachment in ages.

I found more “2005” errors elsewhere in the log, some for attachments, some for regular mailboxes. I also found a “2006” error, but I wasn’t able to find the corresponding entry in the log in Backup, so I have no idea what’s going on here.

I’ve already reported the problem with Backup and attachments in Mail to Apple, so I am not going to bother again. If they need more information, they can get back to me.

All this makes for a very poor troubleshooting experience. And since I am not the one who created the trouble in the first place (I have no idea why Backup failed to back up these files today, when it worked just fine yesterday), there’s nothing I can do. So shame on Apple for providing a less than 100% reliable application, and for making the process of troubleshooting problems created by the application so painful.


Comments are closed.

Leave a Reply

Comments are closed.