Sql-server – Restore a Single File from FileStream

filestreamsql-server-2012

We have an document management application uses SQL Server 2012 to store document index information and uses a Windows file share to store the documents. We are working on migrating to store the documents within a SQL FileStream. However, we have encountered one issue.

According to this document:
http://download.microsoft.com/download/d/9/4/d948f981-926e-40fa-a026-5bfcf076d9b9/FILESTREAM%20Design%20and%20Implementation%20Considerations.docx

It states that “It is not possible to back up a single file as a unit of the filegroup or to restore a single file from the filegroup backup. Keep in mind that you can export a single file when you restore the primary filegroup and then the FILESTREAM backup to a separate instance“.

There are numerous times when a client asks us to restore a single file because they accidentally modified it. With our current system (using a Windows file share that is backed up continuously) we can go to our backup system (Microsoft DPM) then select and restore just a single file to it's original location. If we use FileStream to store the documents within SQL, how can we restore just one document, not the entire database?

Best Answer

In short you can't. You would have to restore the entire database to another machine, then copy the needed file from the restored machine and put it into place on the production server. Single object restores and single row restores (which is what restoring a single file effectively is) have never been supported via the native tools.