Restoring MDF Files From BAK Files – A Manual Solution

Avatar Pooja Awana Updated On - 20 Sep 2019

Database backups act as the only ray of hope for database administrators when they face critical server crashes. For that matter, it is recommended to carry out regular database backups because data loss can take place anytime without any prior alerts or notification and due to many random reasons. There might be cases where you will not be able to access SQL tables, functions, other database components. In such situations, if you have a backup file (.bak file ) saved on your hard disk, you can easily restore the entire SQL database using the MS SQL Database Management Studio. And, you can restore all the deleted and lost database objects to original state precisely.

Manually Restoring MDF Database from a .bak File

Here, is a very quick and easy process by which you can restore your MDF files from the backup SQL file.

STEP 1: Firstly, connect to the database server using MS SQL Server Management Studio. Once connected, find Database node in the left pane and right-click to choose Restore Database.

STEP 2: Now, browse to select the destination and source.

  • Under Destination for Restore: Choose from the two options – To Database and To a point in time.
  • Under Source for Restore: Choose from the two options – From Database and From Device.

STEP 3: In this step, browse for the backup file from your device and add the file to execute restore and click OK to display the list of backup sets.

STEP 4: Select the set from the list of backup sets to restore the database and click OK to begin the restore.

STEP 5: Once, the process of restoring to MDF database from Backup file gets completed, a pop-up message will display saying “The restore of database ‘Database Name’ completed successfully.” Lastly, click OK and your database is ready.

Please note: If you already have the .bak file in the existing data, then you will have to restore the .bak to a different database.

Hope this method works hassle-free with no data loss. But, just in case the manual method does not work or you face errors while restoring from a .bak file, we recommend a professional and efficient third-party tool – Kernel SQL Backup Recovery. The tool provides a world-class SQL backup recovery facility for experts as well as novice users. It provides excellent features for restoring data from SQL backup files to Live SQL or batch file, recovery of MDF/NDF files from .bak files with no size limit. SQL Backup Recovery tool is capable of detecting the version of SQL backup file and repairs corrupt database backup files. Now, you can relax on your seat, and this tool will restore your SQL database in no time.

Let us go through the steps of Kernel for SQL Backup Recovery tool:

Download and then install the trial version of Kernel for SQL Backup Recovery tool from the software website. Then, perform the given steps one by one.

  1. Launch the Kernel for SQL Backup Recovery tool.
  2. SQL Backup Recovery - Home Screen

  3. Click on … (browse button) to add the SQL backup (BAK) file. Select a scanning mode for the recovery and also choose the SQL database version. Then click Next option.
  4. add SQL backup (BAK) file

  5. The software will start scanning data of the added SQL backup file and retrieve all the available objects. Select any SQL backup file object to get its preview. After that, click Save icon at the top.
  6. Check preview

  7. You will have two saving options – Live SQL Server and batch file. To save the data to the Live SQL Server, provide the required details as shown below. For saving to a batch file, you need to browse and provide a saving path location for the batch file; click OK.
  8. Select saving mode

  9. The tool will start saving the database objects from the SQL backup file to the selected destination; it will show the progress as well.
  10. Saving database

  11. After the completion of the process, a confirmation message will be displayed.
  12. Process completed

Hence, MDF files are successfully restored from the SQL BAK files.