Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / March 2008

Tip: Looking for answers? Try searching our database.

differential backup 2005 advice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott - 12 Mar 2008 10:51 GMT
Morning.

Im running a FULL BACKUP in overwrite mode daily at 3am.

Im running a DIFFERENTAL BACKUP in overwrite mode hourly.

I cannot lose more than an hours data.

SQL 2005 Standard.

Backup Timeline:
3am Full
4am Differential
5am Overwrites 4am Differental.
etc ..

So if i restore the 5am Differential have i lost the 3am to 4am data ? (does
it let me do this ?)

If this is the case should I create a Differential overwrite as a separeate
file every hour ? (cannot append as data too large).

Example Timeline:
3am full
4am Differental4am.bak
5am Differental5am.bak

So i need to restore to 5am i need to

1. restore 3am full
2. restore Differential4am.bak
3. restore Differantal5am.bak

Is this correct ?

Thanks for any advice
Scott
Zarko Jovanovic - 12 Mar 2008 11:02 GMT
differential backup backups all changes since last full backup,
therefore in your scenario you don't lose any data.

If you would restore the database, the procedure is:

1- backup the tail of the log (if it's not corrupted)
2- rstore full
3- restore last diff
4- restore backuped log (from 1)

please read more in BOL

it wouldn't hurt to move/rename old diff when doing new one - instead of
overwrite. Consider the case when diff backup doesn't finish OK. then
you don't have any diff backup 'cause:
1- old file was overwritten
2- new one wasn't finished

> Morning.
>
[quoted text clipped - 33 lines]
> Thanks for any advice
> Scott
Scott - 12 Mar 2008 11:08 GMT
ah i see ! : )

many thanks for the reply and the rename tip.

so thats the key, differential is changes since last full .... didnt know
that. All makes sense now.

Whats "BOL" ?

all the best
scott
Zarko Jovanovic - 12 Mar 2008 11:16 GMT
> ah i see ! : )
>
[quoted text clipped - 7 lines]
> all the best
> scott

BOL is Books On Line - Microsoft SQL Server Help, available with F1 key
(no wonder) :-)
Uri Dimant - 12 Mar 2008 11:06 GMT
Scott
BOL says
"A differential database backup records only the data that has changed since
the last database backup. You can make more frequent backups because
differential database backups are smaller and faster than database backups.
Making frequent backups decreases your risk of losing data."

Test  your DDR

create database test
GO
create table test..test(id int identity)
insert test..test default values

backup database test to disk = 'c:\db.bak' WITH INIT
insert test..test default values
backup database  test to disk = 'c:\db_diff1.bak' WITH DIFFERENTIAL
insert test..test default values
backup database  test to disk = 'c:\db_diff2.bak' WITH DIFFERENTIAL

GO
RESTORE DATABASE test FROM disk = 'C:\db.bak' WITH FILE = 1, norecovery
---RESTORE DATABASE test FROM disk = 'c:\db_diff1.bak' WITH FILE = 1,
recovery
RESTORE DATABASE test FROM disk = 'c:\db_diff2.bak' WITH FILE = 1, recovery

select * from test..test

DROP Database test

> Morning.
>
[quoted text clipped - 33 lines]
> Thanks for any advice
> Scott
Steen Schlüter Persson (DK) - 12 Mar 2008 11:12 GMT
Hi,

A DIFF backup contains all changes since the last FULL backup, so you
won't loose anything by skipping a DIFF backup file. Actually, in a
restore scenario, you will restore the latest FULL backup and the latest
DIFF backup - you don't need the DIFF backups in between.

Personally I prefer to backup up to seperate files rather than
overwriting existing files. By backing up to seperate files, I'll always
have the older files available if one of the files suddenly becomes
corrupt. If you keep overwriting and only have one file, then you've
lost everything if this file is damaged.
I know there might be cases where you can get older files from a
filebackup, but most companies only run file backups nightly. This means
that if the file is being corrupted in evening, then you've lost the
whole days backup.

You might also want to read up on BACKUP/RESTORE in BOL - that will
explain the different options you have.

Regards
Steen Schlüter Persson
CRM System Specialist / DBA

> Morning.
>
[quoted text clipped - 33 lines]
> Thanks for any advice
> Scott
Scott - 12 Mar 2008 11:29 GMT
: ) brillant , thank you very much everyone.
Scott
Ola Hallengren - 12 Mar 2008 23:47 GMT
I just thought that you might be interested in a stored procedure for doing
backups that supports creation of backup files with date and time in the file
name, verification of backups as well as deletion of old backup files. It is
available on http://ola.hallengren.com.

Ola Hallengren

> : ) brillant , thank you very much everyone.
> Scott
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.