If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > online backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-28-04, 14:41
globetrotcom globetrotcom is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
online backup

DB2 version 7.2 on Windows 2000

Most of the documentation on backup/restore assume that a crash has occured which does not apply in my case.

What happens when you have logretain set to ON (recover), make a full backup, A, and then make a second online backup, B, a few days later, without any crash in between?

What does the backup B contain?
What happens to logs?
what happens if a crash happens and then you recover from Backup B. Will rolling forward apply correct logs?

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-29-04, 13:47
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
Read up on backups in the administrtion guides - because the answer to some of your questions are it depends on what db2 has been asked to do.

if you do a *full* backup today and another *full* backup tomorrow, tomorrows backup will contain all the data in todays backup plus any added after today's backup.

If you do a full on day 1 and an incremental delta on day 2, then the backup on day 1 contains all data inserted into the database upto the end of the backup (since this is about online backups - you will have to rollforward through logs and in this statement, I mean backup and logs together) and the backup on day 2 contains all data from the end of backup on day 1 to the end of backup on day 2.

Then there are 2 kinds of incremental backups - delta incremental and cumulative incremental.

So in the second scenario, on day 3 you could either have a delta or a cumulative - if you have a delta, that backup will contain data from the end of backup on day 2 to the end of backup on day 3, whereas if you have a cumulative, it will have data from the end of backup on day 1 to the end of backup of day 3.

Archive logs are required to successfully recover from an online backup. So in order to enable online backups, logretain must be set to yes - you may or may not use userexits. If you issue a list history backup statement you will see that the archive logs associated with the backup are identified in the information returned - to answer your question, db2 will apply the correct set of logs associated with the backups.

Hope this helps.
Reply With Quote
  #3 (permalink)  
Old 01-29-04, 14:53
globetrotcom globetrotcom is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
Thanks for your reply.

Let us restrict this discussion to full online backups.

Upon further reading, I get the following impression. Please let me know if you disagree:

One can do multiple online backups without doing any roll-forward in between. Each time an online backup is done, the corresponding log files are closed and archived. So, one can do online backups A, B, and C in that chronological order. Then, at any time one can do, either full recovery, or at least to the time that backup was made. For example, one could do either full recovery from backup B or recover upto the point in time B was backed up.

If this is true, I like the online backups even more!

Thanks
Reply With Quote
  #4 (permalink)  
Old 01-29-04, 15:21
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
People usually like online backups because the database is up and available to users and transaction processing.

DBAs are wary because recovering from them can turn into a complicated (and stressful) situation.

The answer to your question is yes and would be yes for full offline backups as well.
Reply With Quote
  #5 (permalink)  
Old 01-29-04, 17:08
dbamota dbamota is offline
Registered User
 
Join Date: Sep 2003
Posts: 237
If any updates to database are made between the START and END of online backup, it is caught by LOGs. In this case, when you restore, DB is in rollforward pending state. You HAVE to rollforward to a ZULU(GMT) time. Oracle allows you to rollforward to a local time. Local ,GMT time difference is always indicated in dBforums; so it should not be a problem. Also, you have to restore inactive logs to the appropriate place. If you can find a window, where you can force off everybody, then you are better off taking offline backups. By tuning backup parameters, you can narrow the backup window.
__________________
mota
Reply With Quote
  #6 (permalink)  
Old 01-30-04, 11:50
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
One way to determine the minimum point in time to rollforward to is to give the database an improbable date in the past like a year ago - the database returns with the exact minimum point in time. Rollforward must always be run at the catalog node.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On