Now we are going to learn how to backup a database in SQL Server 2008R2.
First why we need a backup:
Before doing any major operations in the database, it is always a good practice to backup the database.
If something goes wrong in the database, you can simple restore the backup that you have taken and you can able to undo the database easily to a earlier stage.
Step 1: Open SQL Server Management Studio. Right Click on the Database. Select ‘Tasks’. Select ‘Backup…’
Step 2: Now the BackUp Database window opens and Select the Source Database. Select the Recovery model as ‘FULL”. In the destination Text area, Select Backup to Disk. Click on ‘Add’ button and choose the directory and file name that you want to have your backup. Example: “C:\SQLDB\AdventureWOrks20008R2.bak”
“.bak” is the file format for SQL Server database backup files.
Step 3: Click on the “Options” tab in Back Up Database window and mostly I will leave everything to default settings here.
Step 4: Click OK. You should get a prompt like below after the database is successfully backed up.
Now you can go and see the “.bak” backup file in the directory you have chosen. Thats it. You have backed up a database using SQL Server.