Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Incremental backup Job

Author  Topic 

sqlpintu
Starting Member

3 Posts

Posted - 2009-02-03 : 18:04:32
Hi,

How can i setup incremental backups on a database that runs every 4 hours between 10am-6pm? And how i get to restore it when there is a crash? I already have a full backup job that runs every friday night.

Please help me with incremental backup methodologies with your suggestions and scripts

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-03 : 18:07:50
You can do it via a maintenance plan, BACKLOG LOG, or even a custom script. What are you using for your full backup?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sqlpintu
Starting Member

3 Posts

Posted - 2009-02-03 : 18:19:02
There is a script (stored procedure) that backsup all the databases, zipz and stores in a shared network location. A job is scheduled that runs every night at 10pm. So there is differential backup on all days and friday night FULL backup is done.

However, i want to write seperate script and schedule another job for incremental backup that runs all through the day every 4 hours.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-03 : 18:52:47
Check out my backup code, which handles full, differential, and incremental backups: http://weblogs.sqlteam.com/tarad/archive/2008/08/19/Backup-SQL-Server-Databases.aspx

Incremental backups are done with BACKUP LOG.

We backup our transaction logs (incremental backups) every 15 minutes.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sqlpintu
Starting Member

3 Posts

Posted - 2009-02-04 : 11:28:35
Thanks a lot..a very useful script. SO can i modify the script for just performing incremental backups?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-04 : 12:14:13
You do not need to modify the script to perform just incremental backups. All you need to do is pass the appropriate value to the stored procedure when you execute it. Pass "TLog" to @bkpType.

Also, I will be sending out a new version of this stored procedure in the next couple of weeks. Be sure to check my blog for it. I will be created in a new blog post, although that link above will be edited to indicate a new version is available.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -