How to recover data from reinstallation of Windows server 2012 R2

CL Lee 21 Reputation points
2020-08-18T13:09:58.067+00:00

Hi there,

I'm facing a problem that I have restore the data from the backup and the data is not up to date.

Previously I had faced a windows update issue and cause the server to restart in a loop.

After restore the data from the backup. I notice that the data is not up to date.

I have 2 partitions
c:\ System/Application/Database engine.
e:\ SQL database mdf file.

Currently the mdf files is not up to date. It restore the data from the previous month.

The original mdf files is already up to last week data.

I not sure what happen to the backup.

I'm try to recover the data by using some tools to do a deep scan but it seem like cannot recover or I don't know how to use it.
Is there any way to recover this data?

T.Q.

Regards,

CL Lee

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,948 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Erland Sommarskog 112.7K Reputation points MVP
    2020-08-18T21:38:55.727+00:00

    It is not clear what you did exactly. You talk about mdf files, and that is normally not how you restore databases.

    However, a common error that people do is that they say:

    RESTORE DATABASE db FROM DISK = 'C:\somepath\backup.bak'

    and overlook that the backup file includes more than one backup. What happens in this case is that you will get the oldest backup in the file. To get a get a later file, you need to say, for instance,

    RESTORE DATABASE db FROM DISK = 'C:\somepath\backup.bak' WITH FILE = 2

    You can view which files there are in the backup file with the command

    RESTORE HEADERONLY FROM DISK = 'C:\somepath\backup.bak'

    1 person found this answer helpful.
    0 comments No comments

  2. Shashank Singh 6,251 Reputation points
    2020-08-18T13:32:42.913+00:00

    After a database restore their is no going backup you would not be able to recover the data which was before you restored, unless you have backup which stored that.

    0 comments No comments

  3. m 4,271 Reputation points
    2020-08-19T05:55:10.66+00:00

    Hi @CL Lee ,

    I not sure what happen to the backup.I'm try to recover the data by using some tools to do a deep scan but it seem like cannot recover or I don't know how to use it.

    Is there any way to recover this data?

    What is your backup policy? Do you backup automatically or manually?
    Or you do not backup recently but you expect the backup file can be restored to the latest the date as the it .mdf?
    You can only restore it to the latest time of the backup file.

    And after the backup or before the restore, you can use code as next to check the details of backup files.
    restore headeronly from disk = 'X:\xxx\xxx.bak'

    More information :
    BR,
    Mia
    If the reply helped, please “Accept Answer” and upvote it.--Mia


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.