Results 1 to 6 of 6

Thread: Restore the primary database of a log shipping configuration

  1. #1
    Join Date
    Jul 2013
    Posts
    3

    Restore the primary database of a log shipping configuration

    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?

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,922
    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.

  3. #3
    Join Date
    Sep 2002
    Posts
    5,938
    Don't need reset log shipping, just restore db from same backup file on both side.

  4. #4
    Join Date
    Jul 2013
    Posts
    3
    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?

  5. #5
    Join Date
    Sep 2002
    Posts
    5,938
    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.

  6. #6
    Join Date
    Jul 2013
    Posts
    3
    Thanks. I'm going to suggest to the client that we give this a try on a seperate test server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •