You are on page 1of 9

SQL SERVER BACKUP/RESTORE AND DISASTER RECOVERY

SCHEDULE DAILY BACKUP FOR SQL SERVER DATABASE USING SQL AGENT

1. Open SQL SERVER 2012 Management Studio and connect a server


2. Expand the tree (left navigation) ” Management Maintenance Plans”
3. Right click on node Maintenance Plans and Click “Maintenance Plan Wizard” (As shown in figure below)
which causes to open a wizard.

4. Click Next and follow the wizard.

5. In 2nd step of the wizard, you can schedule the task as clicking the Button “Change” as shown in the following
6. Click the “Change” button you will get a new popup to enter schedule details as shown below. Configure backup
frequency on preferred schedule.
7. Click OK. It will save the schedule info and close the popup. And click Next button to follow the next step.

**NOTE: We strongly recommend to set Frequency to Daily.

8. In this step you will be asked to check the check list for all the tasks those can be added in maintenance plan.
Select “Backup Database (Full)” as shown in the figure.

9. Follow the wizard until you get following window. Select one or more databases from the list of databases by
clicking dropdown for Databases.

Page | 3
10. From the above window, browse the folder location where to store the backup files.

Note: To set backup location to shared folder/NAS/file server, you may place the access path(ex.
\\server\sharedFolder). Then Run SQL agent service

11. Continue the steps until you get to Finish step.

12. Click Finish. Once you click finish, the wizard will execute the steps to create a job to schedule database.
Immediately you will notice a job created in Sql Agent -> Jobs.

13. As per the schedule, the job runs (Repeatedly or One time) and it creates backup file with name
DB_NameMMddyyyyHHmm.bak (Ex: NorthWind060420081912.bak) in the specified folder (Browsed in the above
step).

**NOTE: For redundancy and data safety, we strongly recommend to have an external backup daily. You can use
external hard drive or store it on separate machine.

SQL ONE-TIME BACKUP

1. Open SQL Server Management studio.

2. Expand Databases and right click on the DB you want to backup, go to Tasks and choose Back Up..

Page | 4
3. Another window will pop up where you can edit the destination of the backup file and the file name. See
below.

4. For Destination: Click Remove and then click ‘Add’ if you want to specify other destination path where
your backup will be stored.

5. After editing the necessary fields, click OK to proceed with the backup.

Page | 5
RESTORE/RECOVER FROM A BACKUP

1. Open SQL Server 2012 Management Studio.

2. Connect to the appropriate server.

3. Right-click Databases > Restore Database and another window will pop-up.

4. Select Device and click on ellipses and click Add to locate the file.

5. Locate the latest .bak file.

Page | 6
6. Once done, click OK.

7. Click Files and modify DB file names if backup file came from LIVE DB.

Ex. Edit CRMFINALVISMIN.mdf  CRMFINALVISMINtest.mdf


CRMFINALVISMIN_1.LDF  CRMFINALVISMIN_1_test.ldf
** Leave the rest as-is.

Page | 7
8. Click Options and make sure Tail-log Backup backup is unticked.

9. Click OK to start restoration. A prompt message will appear once the installation is done.

Page | 8
DISASTER RECOVERY OPTIONS

METHOD DESCRIPTION ADVANTAGES DISADVANTAGES


Store SQL Backup files on - No additional cost - High risk in the event of
server’s internal storage. hardware
INTERNAL STORAGE
failure/malware
infection, etc.
Store SQL Backup files on - Low cost - Expected high
external storage (ex. - Easy to maintain downtime/recovery
EXTERNAL STORAGE
External HDD, Network - Portability specially during hardware
storage, etc.) failure.
Run SBO on a virtual - Fast restoration in case - Expected high
VIRTUALIZATION
environment. of OS failure downtime/recovery
- Flexibility specially if hardware fails.
Setup identical server. - Minimal downtime High cost of setup
STANDBY BACKUP - Will reside on the same - Fast recovery
network as the main server.
SERVER - With SBO system
installation

RECOMMENDED MAINTENANCE PLAN

BACK UP TYPE FREQUENCY RETENTION TARGET


Every last month of the year
NATIVE/TRADITIONAL –
(December) 1 year External, NAS
WINDOWS BACKUP
Monthly - every 1st day of the
FULL DATABASE - SQL
following month 1 year Local Disk/ External/ NAS
MANAGEMENT STUDIO
Weekly - every Sunday, 12 AM
FULL DATABASE - SQL
1 week Local Disk/ External/NAS
MANAGEMENT STUDIO
DIFFERENTIAL (DAILY FULL
Daily - Monday to Saturday every
DATABASE) - SQL MANAGEMENT 11pm
1 week Local Disk/ External/ NAS
STUDIO
Depends on log size;
TRANSACTION LOGS - SQL
Suggested is every 2hrs starting 12am. 1 week Local Disk/ External/ NAS
MANAGEMENT STUDIO

Page | 9

You might also like