Solved

Can't restore differential backups in SQL Sever 2012

Posted on 2016-08-22
10
37 Views
Last Modified: 2016-08-24
I have a SQL 2012 server with a maintenance plan that takes full backups daily, differential backups every 3 hours and transaction log backups every hour.

Up until last month, everything was working fine, I could restore any full and differential or transaction log backup to the test server with no issues.

Came back from vacation, and for some reason I can't restore a full + differential backup anymore. Restoring the full backup works fine, or full backup + transaction log back ups works. But if I go to restore, select device and choose both the full and differential backups, normally it would show the Full and Differential backups as two line items, but instead it only shows the Differential, and I can't restore it.

Any ideas on what could cause this?
0
Comment
Question by:McCoyIT
  • 5
  • 5
10 Comments
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 41766453
I'm not sure if I understood your issue. Can you add a screenshot of it?
Anyway, I don't think your backup plan is a good one. Why do you need to take a DIFF BAK every 3h?
If you're running a daily FULL BAK I even think that a single DIFF or no DIFF is even needed.

For a good backup strategy you need to know how much data can you loose. With your current strategy you can lost 1h of data. Is data ok for your client?
0
 

Author Comment

by:McCoyIT
ID: 41767146
I'm not entirely sure, the plan was set up by somebody else. I'm guessing the differential backups were in case of a problem with the transaction log backups, or is that flawed logic?
Also differential backups are retained longer than log backups.

I've attached a screenshot of what I should see in the restore screen, and what I currently see.

In both cases I have selected the full backup and a differential backup from the same day.
Previous.JPG
Current.JPG
0
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 41767176
I'm guessing the differential backups were in case of a problem with the transaction log backups, or is that flawed logic?
I don't think so. What happens if the problem is with the differential backup instead of the transactional log backup?
Anyway a differential backup takes longer than a transactional log backup and can origin performance issues if you're running it when the database is being used actively.

Also differential backups are retained longer than log backups.
How are you retaining the backups? Do you copy the files to different tapes?

In both cases I have selected the full backup and a differential backup from the same day.
What is the device? Are you sure that you didn't have a failed full backup for the 2nd screen?
0
 

Author Comment

by:McCoyIT
ID: 41767184
Backups are being retained on a deduplication disk backup appliance.

We retain transaction log backups for the current week, differential backups for the current month, then just the full backups.

I have confirmed the full backups work fine, I can take a full backup and any combination of log backups from the same day and the restore works fine. It's only the differential restore that is not working, but the agent log shows all backups completing successfully.
0
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 41767202
Just wanted to see the backup chain.
You can always query the msdb database:
SELECT TOP 20 database_name, backup_start_date, backup_finish_date, type, backup_size
FROM backupset
WHERE database_name='DatabaseNameHere'
ORDER BY backup_start_date DESC

Open in new window

NOTES: Replace the database name with the correct one
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:McCoyIT
ID: 41767233
database_name	backup_start_date	backup_finish_date	type	backup_size
McCoy	2016-08-23 10:00:02.000	2016-08-23 10:00:02.000	L	56517632
McCoy	2016-08-23 09:00:03.000	2016-08-23 09:00:05.000	L	256933888
McCoy	2016-08-23 09:00:03.000	2016-08-23 09:00:10.000	I	1680172032
McCoy	2016-08-23 08:00:02.000	2016-08-23 08:00:03.000	L	20602880
McCoy	2016-08-23 07:00:03.000	2016-08-23 07:00:03.000	L	24666112
McCoy	2016-08-23 06:00:02.000	2016-08-23 06:00:02.000	L	8413184
McCoy	2016-08-23 06:00:02.000	2016-08-23 06:00:05.000	I	524575744
McCoy	2016-08-23 05:00:03.000	2016-08-23 05:00:03.000	L	10836992
McCoy	2016-08-23 04:00:03.000	2016-08-23 04:00:03.000	L	5856256
McCoy	2016-08-23 03:00:02.000	2016-08-23 03:00:02.000	L	2120704
McCoy	2016-08-23 03:00:02.000	2016-08-23 03:00:03.000	I	125068288
McCoy	2016-08-23 02:41:13.000	2016-08-23 02:41:13.000	L	55666688
McCoy	2016-08-23 02:31:28.000	2016-08-23 02:31:41.000	D	25271066624
McCoy	2016-08-23 02:00:04.000	2016-08-23 02:00:04.000	L	120747008
McCoy	2016-08-23 01:00:02.000	2016-08-23 01:00:02.000	L	35741696
McCoy	2016-08-23 00:00:03.000	2016-08-23 00:00:54.000	D	25269986304
McCoy	2016-08-22 23:00:02.000	2016-08-22 23:00:03.000	L	109737984
McCoy	2016-08-22 22:00:02.000	2016-08-22 22:00:03.000	L	61171712
McCoy	2016-08-22 21:00:02.000	2016-08-22 21:00:03.000	L	59862016
McCoy	2016-08-22 21:00:02.000	2016-08-22 21:00:14.000	I	2611307520

Open in new window

0
 
LVL 46

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 500 total points
ID: 41768273
I can see you have 2 Full Backups (type='D') one made at midnight and another one at 02:31AM. Why's that?
And between those 2 Full you have 2 transaction log backups (type='L') and none differential.
First differential (type='I') from yesterday has ran at 03:00AM but it respects the schedule that you said of every 3 hours.

If you know when the problematic backups were made then add the period to the query and post here the results. Example to bring all backups made at 21st of August:
SELECT database_name, backup_start_date, backup_finish_date, type, backup_size
FROM backupset
WHERE database_name='McCoy' AND 
    backup_start_date >= '2016-08-21' AND backup_start_date < '2016-08-22'
ORDER BY backup_start_date

Open in new window

0
 

Author Comment

by:McCoyIT
ID: 41768874
Good catch, Veeam was recently updated so something must have changed with how it handles SQL server backups, that server backup ran at 2:31 so that would explain the extra full backup, just have to figure out what's going on there now. Thanks!
0
 
LVL 46

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 41768884
Yes, having a 2nd tool performing database backups can mess with the current backup plan. You should sort this out and have only a single tool.
0
 

Author Comment

by:McCoyIT
ID: 41768888
My coworker upgraded Veeam and it looks like "Enable application-aware processing" got enabled on the SQL server backup job, which was taking the extra full backup and breaking the chain.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.

932 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now