Restoring Windows Index Database

I haven’t been here for a while, which is kind of an understatement. To be more accurate I haven’t been around here for “seems like you have died” is
closer to the truth. Well, the news of my demise were obviously exaggerated, which means that I am writing here now, yet it’s not going to be a regular thing.


What happened is that I got annoyed, so I decided to dust off my technical skills (a lot of dust) and take care of what annoyed me. 


Lately, my main tool of trade is e-mail. As such, I use Outlook on Windows 8. As most people (or at least so I assume) I heavily rely on the
search abilities of Windows. Most of the time, everything is good, but once in a while something causes the system to recreate the index database.


This means that while the system re-indexes al my itms I can’t execute any searches accurately(again with the understatements). Now considering that
I have about 400K+ items, this might take a while effectively ruining my day…So I decided to do some research and try to understand if it’s possible to backup
the search database and restore it in such cases.


DISCLAIMER: This method is not endorsed or recommended by Microsoft (as far as I know). This might actually damage your computer and data.
This is something I found while personally exploring.



Use this at your own risk !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



It turns out that the database is located  under : ‘C:\ProgramData\Microsoft\Search\Data’ . To backup this directory I did the following:


  1. Stop the ‘Windows Search’ service. Please note that you should move it to ‘Disabled’ or it will restart.
  2. Copy the directory to an alternate location.
  3. Start the service and move it back to ‘Automatic (Delayed Start)’.

To restore:


  1. Stop the ‘Windows Search’ service. Please note that you should move it to ‘Disabled’ or it will restart.
  2. Rename the current ‘Data’ directory to something else.
  3. Copy your backup to the original location.
  4. Start the service and move it back to ‘Automatic (Delayed Start)’.

 


What I found was that all of my searches continued working as nothing has happened. In other words, the service was restored
in seconds.


One caveat- when I started Outlook it kept saying that the results might be incomplete as indexing is in progress, but from what I saw
all the results were returned correctly. Eventually Outlook re-indexed all my items, but this didn’t stop me from working or searching
among my 400K+ items while it did so.