When using a database you often need to create a backup file of the database to store the information periodically, which is useful when you have lost your database from SQL Server for whatever reason. In this situation you can restore your database from the backup file and get the deleted information back.
Use the following procedure to create and restore a database backup file.
Creating the Backup
Open SQL Server 2012 and create a database then right-click on the "Name of database" >> "Task" >> "Backup".
Now the Backup database window will be shown; click on the "Add" button to add the designation to save the backup file in the hard disk.
Choose the location where you want to save the backup file.
After inserting a name for your backup click on the "Ok" button to see the message:
Right-click on the "Database" >> "Restore Database".
Select the Radio button "Device" then click on the button to get the database backup file.
Click on the "Add" button to get the database file.
After adding the backup file click on the "OK" button.
The following message is displayed after the database is restored: