Administration

Filegroup Restore from a Full Backup?

Can you perform a SQL Server filegroup restore using a full backup file as input?  I couldn’t find anything that specifically stated that in documentation, so I tried it.  YES you can!  It worked great!  I wanted to use this technique to create a testing database without copying the data from a particular set of tables (in this case it was filestream data) on a different server.  I just used the existing full backup file from my production database and ran a RESTORE command.   Here are a couple of notes about it:

  1. The database cannot previously exist, so you must drop the database first.
  2. You must restore (at a minimum) the primary filegroup and the log, using the WITH REPLACE option.

I cut about 66% of the restore time off (since there were many filestream documents in the filegroup that I skipped).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s