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 > DB2 9, backup and restore on a different yet identical box

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-09-07, 12:33
ethansmith ethansmith is offline
Registered User
 
Join Date: Jan 2007
Posts: 12
DB2 9, backup and restore on a different yet identical box

At my shop, we've been using DB2 8.2 as our database server. We have 3 Linux boxes, live, test, and dev. Currently, we have one backup script that looks like this:


db2 "force applications all"
db2 "update database configuration for the_database using logretain on"
db2stop
db2start
echo 'Backing up now....'
db2 "backup db the_database user db2inst1 using the_password to /home/db2inst1/DB"
echo 'Backup complete.'

The backup file that is generated can be restored and rolled forward on any of the 3 boxes with ease.

As of last week, we've installed db2 9.1 on our test and dev boxes. I've been able to successfully restore the backup file from live to this new database and migrate it correctly as well. It's fully usable. I can backup the new db2 9.1 version of the database using the same script above.

The problem comes when I try to restore it on a different box (origional on dev; moving new db backup to test). The restore works fine but I can't roll the DB forward. (Using db2 rollforward db the_database to 2008-01-01-12.00000000 and stop) I get this error:

SQL1268N Roll-forward recovery stopped due to error "24" while retrieving log
file "S0006892.LOG" for database "THE_DATABASE" on node "0".

I've done a bit of research and everything I've found so far say "make sure your log files are in the correct directory etc etc"

Do I have to backup log files as well now and move them between boxes like the db backup file or am I missing a new step in how I backup the database?

If I do have to back up log files as well, doesn't that seem a little counter productive? I mean, what's the point of a backup file that doesn't restore on it's own?

Any help with this would be great.

Thanks in advance.

--Ethan
Reply With Quote
  #2 (permalink)  
Old 05-09-07, 16:05
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
It looks like you are doing offline backups. You should be able to restore the DB without log files. Try using the "WITHOUT ROLLING FORWARD" option on the restore.

Andy
Reply With Quote
  #3 (permalink)  
Old 05-10-07, 08:43
ethansmith ethansmith is offline
Registered User
 
Join Date: Jan 2007
Posts: 12
Wow, that worked! Thanks!

I'm going to do some testing to make sure all my data is good to go (I'm paranoid like that) but it restored fine AND I was able to connect to it.

Thank you very much.

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