Sql-server – Restoring a Database Using Full Backup and Transaction Logs in SSMS

restoresql serverssms

I have a full backup file (.bak file) of a database for the 25/10/2019. However I want to restore the database to the 21/10/2019.

My problem is that I do not have the full backup files for the 21/10/19. The last full backup for the database I have is 25/10/19. What I do have are transaction logs going back to the 21/10/19.

In SSMS I have tried using the full backup file for 25/10/2019 and using the preceding transaction log files to restore the database to 21/10/19; however, it does not work and says unable to create restore plan due to break in LSN chain.

Please note a full backup of the database is made each night and every 30 minutes for the transaction logs.

The full backups prior to 25/10/2019 have been deleted.

Is it still possible to restore the database to a point in time using transaction logs? Either within SSMS or using a T-SQL command?

Best Answer

To perform a restore to (for example) 11:45 AM on October 21st, you need the last full backup that was taken prior to that time, plus your transaction log backups up to and including Noon (assuming the log backups happen exactly on the hour and half hour) on October 21st.

As you do not have a full backup prior to October 25th, you cannot do a restore to a point in time prior to that. With the backups you currently have, you cannot achieve what you're attempting to do.