Steps to attach .MDF and .LDF files of MSSQL databases to convert it to .bak format
Posted by Kayalvizhi S, Last modified byon 02 June 2015 04:35:38 PM
The MSSQL databases has to be in the .bak format in-order to restore it via Plesk panel. However the database backups which we keep on our backup servers are in the format of ".MDF" and ".LDF". So you need to attach these files to convert it to .bak format file. You can do this by referring the following steps :-
Step 1 - Login to the MSSQL server installed in your local machine using MSSQL management studio tool (version 2012).
Step 2 - Right click Databases and then click on Attach as shown in this image.
Step 3 - Click on Add and browse the .MDF and .LDF files as shown in this image.
Step 4 - Now after adding the .mdf & .ldf files, you need to click on OK as shown in this image.
Step 5 - Now the database is locally restored in the MSSQL server installed in your local machine.
If you want to restore this database via Plesk panel, you need to take the database backup in .bak format using the following steps :-
Step 1 - Login to the same MSSQL management studio tool where you have locally restored it using .MDF and .LDF files.
Step 2 - Right click on the database shown under "Databases" list.
Step 3 - Click on tasks and then click on backup.
Step 4 - Note down the backup file location and name. Then click on OK. Please refer the image as mentioned follows for reference.
Step 5 - Now you can see the database backup in .bak format (in the same location where it was listed in step 3).