Database backup and restore questions.

  • Hello:

    I’m not one hundred percent sure on database backup and restore and have questions.

    Scenario

    ·        A developer accidentally deleted the production database on  January 21st at 10 AM.

    ·        Questions:

    o   How can I recover the database point of time?

    o   Can I restore or recover the production database point of time if I did not have

    the differential and logs backup files but I have the latest full backup

    Thank you,

    Edwin

     

     

     

     

    January – Backup Inventory

    Full Backup

    • 1 Full backup on Jan 3
    • 1 Full backup on Jan 10
    • 1 Full backup on Jan 17
    • 1 Full backup on Jan 24
    • 1 Full backup on Jan 31

    Differential backup

    ·        6 differential files in week on Jan 3

    ·        6 differential files  in week on  Jan 10

    ·        6 differential files  in week on  Jan 17

    ·        6 differential files  in week on  Jan 24

    ·        6 differential files  in week on  Jan 31

    Log backup  – schedule to backup hourly

    ·        168  database backup log files on  week Jan 3th

    ·        168  database backup log files on  week Jan 10th

    ·        168  database backup log files on  week Jan 17th

    ·        168  database backup log files on  week Jan 24th

    ·        168  database backup log files on  week Jan 31th

     

  • To answer your last question - no, you cannot restore to a point in time without having the full backup *prior* to the event and all transaction log backups from that last full backup to the point in time you wish to recover - or you have the full backup prior to the event, a differential prior to the event and all log backups from the differential up to the point in time you wish to recover.

    There is no option or method of restoring a full backup *after* the event and rolling back transactions to a prior point in time.  That is why you always want to maintain an unbroken chain of full/diff/log backups available.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Thank you, Sir.

    Your answers cleared up our questions.

    Thank you so much for your prompt response.

    1. Your database needs to reside in a non-simple recovery model. ( preferable full recovery model )

      You need at least create one FULL backup ( to actually activate the log to be non-simple recovery )

      You can recover PIT if you have a full backup and all subsequent log backups to the PIT. ( there can even be other fullbackups created in the mean time, but they could be not available to you  )

      Diff backups can only be actuated from the previous PIT of a full backup , but can avoid the need to restore all previous log backups since that full backup. Log backups after that diff backup up to the PIT must still be restored.

    2. Once your available backup files only cover after your PIT, there is no undo-transactions button to go back in time.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

Viewing 4 posts - 1 through 3 (of 3 total)

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