Contents tagged with Backup

  • Source-controlled database backups

    This is in beautiful Kauai in case you were wonderingI’m not very satisfied with traditional database backup solutions. It seems like almost no progress was made since SQL Server 6.5 (at least for the built-in tools). They are still outputting monolithic binary backup files that only do the job if the only thing you expect from backups is the ability to recover from catastrophic failures. I expect more, but before I explain, we need a disclaimer:


  • 0x81000037, 0x80070002 and how I finally convinced Windows Backup to do its job

    0x81000037 When trying to backup my machine onto a USB drive, a few weeks ago I have been starting to get a very unhelpful 0x81000037 error. Of course, the first thing I did was to bing it but I didn’t like what I found. There is a “How to troubleshoot Windows Backup and Restore issues when a reparse point folder or its subfolder is added to a user library in Windows 7” KB article that unfortunately does not live up to its title. It does some hand waving around “reparse points” but does not even bother to explain what a reparse point is, let alone how to discover and remove them.

    Other links I found were from distressed users hitting the problem and having no clue how to solve it. Responses from support have been equally unhelpful and full of jargon as the KB article. The poor users seem to all have resorted to more or less extreme solutions, ranging from using a third party backup system to reformatting the machine.

    I did not want to do either of those so I spent a disproportionate amount of time troubleshooting this and trying to come up with a solution that worked for me. Hopefully this will help others.

    But first things first. What the hell is a reparse point?

    Reparse points are to folders what shortcuts are to files. Roughly speaking. It’s an alias for a folder, created so that you can access that folder coming from different places. Technically it allows a few more elaborate scenarios but that’s the idea. For example, if you open Windows Explorer and go to favorites, everything you see is reparse points:Favorites Reparse Points

    If you open any of those folders, you are going to get transported to a completely different part of your hard drive: the real folder that the reparse point points to.

    For example, if I open “Downloads”, I will end up in “C:\Users\bleroy\Downloads” which is not under anything resembling “Favorites” (note: the Windows Explorer favorites are different from IE favorites). Libraries is a similar catalog of reparse points. Really reparse points are everywhere under your user data folder.

    So once we understand what reparse points are we need a way to find them before we can remove them. If we got this error, we know that there are reparse points under some of the folders that are in the current backup plan.

    In order to know what is in your current backup plan, go to the backup and restore control panel (Control Panel\System and Security\Backup and Restore) and click “Change settings”. Click “next” until you reach the screen asking you what you want to back up. Write down all the top folders that are checked, then click cancel.

    Now you’ll want to open a command line (hit the Windows key and type cmd and enter). Next, cd into each of those directories and type the following command:

    dir /A:L /S *

    This is something I found completely fortuitously while digging into the help topics of commands. MSDN was of zero help here and only gave me commands to manage reparse point if you know where they are, but nothing to actually find them.

    The result should look something like this, with each reparse point appearing as a <JUNCTION>, a junction being one kind of reparse point (see comments section for more info):List All Reparse Points

    Well, actually, that is the result on my box once I have cleaned up. Because in the end, cleaning up my drive was what enabled me to put backup back on track.

    Here are a few things I did:

    • Remove all reparse points I found under folders I absolutely had to back up or at least remove them from the backup plan.
    • Remove from the backup plan folders that I didn’t really need backed up.
    • Clean up old files that I didn’t need any more.
    • Move and reorganize things around so that my file organization is more rational and makes it easier to actually find stuff.
    • Be careful not to remove reparse points I wasn’t sure would not be needed by the system or by applications I use.
    • Simplify, simplify, simplify.

    After each step, I tried to backup again. In the course of doing that, I got another error, 0x80070002. The claim from support on this one is that it comes from user profiles lacking a user profile path. That was not the case for me and I managed to get rid of the error by doing more cleanup of my file system.

    In the end, once my drive was thoroughly cleaned of about 40GB of junk, I was able to achieve a somewhat successful backup:Backup Victory

    The only remaining error here was benign: I was still under my old backup plan that was pointing to some of the stuff I had deleted.

    The list of files is easily obtained by going into options and then clicking on “view skipped files”:View Skipped Files

    Going through the backup wizard again enabled me to get rid of those errors and I’m happy to say that my backup panel now looks like this:Backup Complete Victory

    I sincerely hope this helps others get their backup working without them having to fumble for weeks like I did.