# Database Discussions > Microsoft SQL Server 2008 >  Restore the primary database of a log shipping configuration

## jbrown08322

I support a company that is using Log Shipping setup by the previous DBA. The log shipping is setup to do the default transaction log backup/ship each 15 mins, 24 hours a day. Each night I do a Full backup of the Primary database which takes about 30-50 mins. So during this backup the log backup/ship has occurred several times.

If I should ever be called upon to restore from that previous nights backup Im not sure how I would proceed. Ive Googled this and seen that first you should turn Log Shipping off at the primary server, which makes sense. But after I restored the previous nights backup where would I go from there? Could I start restoring those log ship transaction backups? But where would I start, the one after the Full was done, or the first after it started?

----------


## skhanal

You will have to reinitialize the logshipping as your secondary is ahead of primary and you can't restore new transaction logs generated at primary. To reinitialize you can restore the same backup at secondary as the one you used to restore primary.

----------


## rmiao

Don't need reset log shipping, just restore db from same backup file on both side.

----------


## jbrown08322

OK, I need to clarify the situation I’m trying to figure out with a example:

Full backup of primary is done each night, during which Log Shipping occurs on its 15 min schedule to the secondary’s.
10 AM the next day users slam the primary database somehow. Secondary’s duplicate the same error 15 min’s later.
11 AM they realize their error and they want me to restore the previous night’s backup, to the primary, and apply transaction logs up till 9 AM before they messed up.

So my question really is; can Log Shipping transaction backups be used to accomplish this? Would I need to change the LS Transaction backup schedule to stop while the full backup is in progress, so there is a clear starting point?

----------


## rmiao

Yes, you can use log shipping's log backups for recovery. Don't need stop log backup while full backup is running, no matter there's log shipping or not. But do need full backup db after recovery and restore in on secondary server.

----------


## jbrown08322

Thanks. I'm going to suggest to the client that we give this a try on a seperate test server.

----------

