How to restart interrupted restore operations

restart interrupted restore
Situations in which a restore operation is interrupted are not very uncommon.
This is why, in this post, we will show you what you have to do in order to restart the interrupted operation using T-SQL queries.

In case your restore operation was interrupted, you can still restart the process and continue from that point where it got interrupted.

This is a feature that can be very useful if you have very large databases which you have to restore. In case the process of restoring fails close to the end, most of the times you can restart the entire operation from the point where it left off, instead of restarting the entire restore process of the database.

To be specific, at the time when you make your restore from tape, you can restart from the current tape instead of restarting from the first one. But, if the restore was in the phase when it was being rolled forward, then no data will be copied from that backup set.

Restart interrupted restore with T-SQL

If you have used a T-SQL query to restore your database and the process was interrupted for any reason, known or unknown, then what you have to do is to specify a RESTART clause at the end of the same query and run the query once more.

Let’s assume that you have the following query, or something similar, and it got interrupted during execution.

    • -- Restore a full database backup of myDB database
      
      RESTORE DATABASE myDB
         FROM DISK = 'C:myDB.bak'
      GO

Now, in order to continue and restart interrupted restore operations, applied in our case, we are going to use the query from above finished with the WITH RESTART clause.

    • -- Just run the initial RESTORE statement specifying WITH RESTART in order to restart interrupted restore operations
      
      RESTORE DATABASE myDB
         FROM DISK = 'C:myDB.bck'
         WITH RESTART
      GO

About Radu Gheorghiu

Passionate SQL Developer on the journey of trying to become an expert in all things Data (storage, manipulation, gathering etc.) Information is power, and information can only be obtained from data. Thus, in order to harness the power of information, you must be a master of Data.

2 thoughts on “How to restart interrupted restore operations

Leave a Reply

Your email address will not be published. Required fields are marked *