Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Posts
    12

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •