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 > Working on restoring prod data in dev environment

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-26-10, 11:31
bulump bulump is offline
Registered User
 
Join Date: Oct 2009
Location: Calgary, AB Canada
Posts: 37
Working on restoring prod data in dev environment

.....and it's not going as smoothly as I expected it.


I can't use db2move because I don't have any sense of time, and would hate to copy the WHOLE db nightly, so I'm using restore/rollforward.

I have a backup strategy of a full online backup on Sunday, and incremental deltas Monday-Saturday, which also include the 'include logs' option. After the backups finish nightly, I transfer them over to the dev system and perform:

(Sunday)
db2 -v "restore db $dbname from /db2i1_home/backup taken at $takenDate newlogpath /db2i1_home/backup/backup_log logtarget /db2i1_home/backup/backup_log replace history file "

(Monday-Saturday)
db2 -v "restore db $dbname incremental from /db2i1_home/backup taken at $takenDate newlogpath /db2i1_home/backup/backup_log logtarget /db2i1_home/backup/backup_log replace history file "


Then I rollforward using the logs that (supposedly) are included in the backup image:

db2 -v "rollforward db $dbname to end of backup and complete overflow log path (/db2i1_home/backup/backup_log) noretrieve"



My issue is that sometimes this works and sometimes it doesn't, but I'm not changing anything. At times, I receive the error telling me it's looking for the next logfile (which supposedly the noretrieve takes care of).

I guess my question is, am I going about this the right way? Is there another alternative that I'm not thinking about?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 02-26-10, 13:01
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
I believe that logtarget path needs to be empty each time you do a restore.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 02-27-10, 09:13
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by Marcus_A View Post
I believe that logtarget path needs to be empty each time you do a restore.
Yes, and do not forget your "regular" log-path. This should be empty. Overflow log path only works if the regular log path cannot be used.
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