0

I have accidentaly restored a very old version of my database and have this .bak standard file from 3 days ago.

But I found this "Backup Timeline" in MSSQL that actually points out several backups that I didnt even know that happened. Yet, when I select one of them to restore they simply claim the file doesnt exist (and it doesn't at all in the standard backup folder).

What should I do?? I lost a bunch of important data!enter image description here

2
  • In case the image is bad, it says it did a backup today (Jan 29th) and my full manual backup was created in Jan 27. I REALLY need this Jan 29 version it claims it exists. Jan 30 at 1:52
  • Please edit your question to provide more information, instead of using comments. Jan 30 at 3:22

1 Answer 1

5

If you've taken other backups, you should be able to run this query to find out where the files were created.

SELECT
    bs.database_name,
    bs.backup_start_date,
    bmf.physical_device_name
FROM msdb.dbo.backupmediafamily bmf
JOIN msdb.dbo.backupset bs 
  ON bs.media_set_id = bmf.media_set_id
WHERE bs.database_name = N'gc'
ORDER BY
    bmf.media_set_id DESC;

If the backups were done to NUL, you're screwed. If the backups were taken to the folder that you're looking in but they're not there, you're screwed.

There would be an off chance that multiple backups were taken to the same file name, but since it shows a last modified date of 2024-01-27, that's not likely the case. You can see that for yourself by running this command.

RESTORE FILELISTONLY FROM DISK = 'C:\fill this part in yourself\gc.bak';

There are a lot of different ways this could go. You didn't mention if your database is in full or simple recovery, but there may be log backups involved that need to be restored from a different location.

Anyway, good luck, be more careful in the future, etc.

1
  • Yep, your query actually returns a whole bunch of backups, exactly pairing up with the results of the Backup Timeline. Unfortunately, no backup files found even though it says they were created. Oh well, I'll just handle it the best possible way. Thanks a lot, big guy. I'll set up daily backups. Jan 30 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.