Solved

Can't restore differential backups in SQL Sever 2012

Posted on 2016-08-22
10
44 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 48

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 48

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
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.

 

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 48

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
 

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 48

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 48

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

830 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