?
Solved

SQL Database differential backup on network drive

Posted on 2014-02-21
5
Medium Priority
?
182 Views
Last Modified: 2014-10-27
Hi All,

I want to create a differential backup script for my SQL database which I want to create on network drive . I have already configured one full backup script that runs in every one hour which creates backup file on network drive, similar way I want to create a differential backup which will run every 15 mins and file should be create on network drive where my existing full backup file is created. I have already created one folder for differential backup. I want differential backup should create a new file each time when backup job runs with time stamp. I believe I have tried to convey it properly.

Below is my full backup script:

USE CFSMag;
GO
DECLARE @Path NVARCHAR(1000)
SET @Path = '\\10.91.12.191\contrack\CFSMAG_' + CONVERT(CHAR(6), CURRENT_TIMESTAMP, 12) + '.BAK'
BACKUP DATABASE CFSMag
TO DISK =@Path
WITH FORMAT,
MEDIANAME='D_SQLServerBackups',
NAME='Full Backup of CFSMag';
GO

This is the network path for differential backup
\\10.91.12.191\contrack\Incremental_Backup\
0
Comment
Question by:angnanesh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 39876124
First I have to ask why you are doing a full backup every hour?  That's something that should be done once a week typically and differentials daily.  What recovery mode are you in?
0
 

Author Comment

by:angnanesh
ID: 39876149
Hi BriCrowe,

this is my clients requirement, he wants full backup in every one hour and differential backup in 15 mins. I am using full recovery mode.
0
 
LVL 17

Expert Comment

by:Gerald Connolly
ID: 39876220
Have you thought about doing a full once a day and using differentials (every 15 mins) to create synthetic fulls every hour?

How much data are we talking about, obviously not a lot if you can do a Full in less than 15 mins.
0
 
LVL 27

Accepted Solution

by:
Zberteoc earned 1000 total points
ID: 39876514
Tell your client that is not the way to do database backups. If you want a small PTO then you should use the transnational backup instead. Something like this:

1. FULL backup once a week
2. DIFF backup once a day
3. Transaction log backup every N minutes

Also you can do
1. FULL once a day
2. DIFF every 6hr
3. Tran every N minutes.

I also recommend you very highly to use Ola Hallegrens maintenance scripts. It has the backup stored procedure that does all 3 backups, depending on a parameter, and also takes care of a lots of aspects if needed. You should also use the Index Optimisation and Data Integrity check scripts.  It will help you a lot:

http://ola.hallengren.com/
0
 
LVL 35

Expert Comment

by:David Todd
ID: 39878401
Hi,

I like Ola Hallengren's free maintenance script, that does the backups too

If you run the script as it, it will create jobs that do a full backup, a diff backup, and a log backup of user databases. (And a separate job or two for system databases.)

Then all you have to do is schedule these jobs, and edit the backup destination in the job step.

HTH
  David

PS Just noticed that Zberteoc recommended Ola's script as well, and I agree with what he said about the frequency of backups.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question