stupid stupid stupid restore problem

  • I made a small mistake in my database today and decided to restore from a previous database backup. The only problem is the restore file I used was 5 months old! So I lost 5 months of critical data! I can't find any more recent backups. Is there a way to undo this restore?

    Thanks

  • Restore from the "just in case" backup of the database that you made just before you ran this restore.

  • Most chances that there is nothing that you can do. The main question is if you really didn’t do any backup for 5 months or if there are backups that were done during this time.

    You can query the MSDB database in order to find out if there are any backups that are more recent then the one that you used:

    select max(backup_start_date) from backupset where database_name = 'WriteDBNameHere'

    If there isn’t any newer backup, then there is nothing you can do.

    By the way the topic of this thread is stupid stupid stupid restore problem. I have to say that in my opinion the problem is not the restore. The problem is that there is a chance that a live operational database did not have any backup for 5 months and no one realized that.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Magy (2/12/2009)


    Is there a way to undo this restore?

    Not unless you took a more recent backup.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Michael Valentine Jones (2/12/2009)


    Restore from the "just in case" backup of the database that you made just before you ran this restore.

    I have found that "just in case" is one of the most important SQL DBA skills.

    next time:

    If you just need some simple data recovered, restore your backup as a new database with a different name. I usually append the date of the backup such as MyDatabase_20081201 to remind me it's an old version from 2008-12-01. Then copy out the data you need.

    Run daily full backups and verify they are completing

    etc

  • That reminds me of those 2 procs... hoping you don't need to use them anytime soon :

    exec sp_update_resume

    exec sp_distribute_resume

  • The other way to restore that data is to manually reenter it... that is if you keep some sort of hard copies.

  • Ninja's_RGR'us (2/13/2009)


    exec sp_update_resume

    exec sp_distribute_resume

    :hehe:

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • exec sp_update_resume

    exec sp_distribute_resume

    :w00t:

  • Ninja's_RGR'us (2/13/2009)


    The other way to restore that data is to manually reenter it... that is if you keep some sort of hard copies.

    I remember doing something like that for a client abotu 2 years ago. He had a db file (csv format). He then had a software build all the pages on his website (all static pages). Since the site was still up I was able to scrape it and rebuild the DB.

    Maybe you have something like that available to you... just ask around and see.

  • You weren't taking log backups by any chance?

  • That's a good point... if no log backup was taken between then and now, you could possibly restore to point in time. That could be a hell of a long restore, but that would work.

  • I don’t think that he can use the log after he did the restore operation.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Ninja's_RGR'us (2/13/2009)


    That reminds me of those 2 procs... hoping you don't need to use them anytime soon :

    exec sp_update_resume

    exec sp_distribute_resume

    πŸ˜€ got a feeling he'll be using those anytime now.

    Ninja's_RGR'us (2/13/2009)


    The other way to restore that data is to manually reenter it... that is if you keep some sort of hard copies.

    thats if he got the spare 5 months it took to enter it in the first place πŸ˜‰

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" πŸ˜‰

  • Perry Whittle (2/14/2009)


    Ninja's_RGR'us (2/13/2009)


    That reminds me of those 2 procs... hoping you don't need to use them anytime soon :

    exec sp_update_resume

    exec sp_distribute_resume

    πŸ˜€ got a feeling he'll be using those anytime now.

    Ninja's_RGR'us (2/13/2009)


    The other way to restore that data is to manually reenter it... that is if you keep some sort of hard copies.

    thats if he got the spare 5 months it took to enter it in the first place πŸ˜‰

    I know, but that's still better than losing it all forever. And re-entering data is usually shorter the 2nd time (the usual daily task are not included this time around, it's jsut straight data entry!).

Viewing 15 posts - 1 through 15 (of 43 total)

You must be logged in to reply to this topic. Login to reply