Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2004
    Posts
    306

    Unanswered: Restoring from TSM "raw files"



    DB2 8.2 AIX TSM

    We use TSM and I have been given the task of performing a redirected restore. At my target location site I have a tape which as the "raw files" for the online backup in question (a .1 file a .tdi file and 6 raw log files).

    Does anyone have any idea how I can use these files to perform a restore?

    Cheers,

  2. #2
    Join Date
    Sep 2003
    Posts
    237
    Redirected restore can switch between raw and cooked files; how was the backup done? how did it get on tape? how do you plan to restore at the target location?
    mota

  3. #3
    Join Date
    Jul 2004
    Posts
    306
    Quote Originally Posted by dbamota
    Redirected restore can switch between raw and cooked files; how was the backup done? how did it get on tape? how do you plan to restore at the target location?
    Backup was done using TSM.
    The raw files were restored to disk using the backom -c r_raw -f command
    The files are set to be put on tape to be transported to the other site

    If this is not the best way to go then I do now have the ability to start again...

    In that scenario, I have a TSM online backup, it will expire in a couple of days.
    I need to get that backup from my current site to the other and use it for a redirected restore, what's the best way to proceed?

  4. #4
    Join Date
    Jul 2004
    Posts
    306
    OK So I've been plugging away at it and I've got to a better situation:

    I've managed to perform the redirected restore at the target site by:

    renaming the raw .1 file to a .001 file and running the
    db2 restore db dhs from /scratch/tmp logtarget /db2/NDB/log_dir
    followed by a heap of SET TABLESPACE commands

    All went well and the restore completed sucessfully, but there are no log files in the target directory.
    It tells me that the next log file to be read is S0003706.LOG so I restore all log files from that one forward to the log_dir directory

    Still the rollforward says there are log files missing. So I copy all the currently active log files from the source system to the target.....still can't rollforward...

    Any ideas?
    So I restored the

  5. #5
    Join Date
    Sep 2003
    Posts
    237
    when rollforward fails, what do db2diag.log and nfy say as to what logs in which directory are missing? you will have to extract the log files to the right directory. you can also use OVERFLOW LOG PATH option too in the rollforward command. I find the error messages not too helpful. Redbook on db2 backup and restore is helpful.
    mota

  6. #6
    Join Date
    Jul 2004
    Posts
    306
    It didn't give the required log files in the db2diag or the nfy, just that they were missing. I've managed to rollforward through some logfiles, but it seems to keep going until it runs out then failing?!

    So what I'm looking for is a way of telling EXACTLY which log files an online image needs to get it to a usable state.....

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by meehange

    So what I'm looking for is a way of telling EXACTLY which log files an online image needs to get it to a usable state.....
    db2ckbkp shows this information.
    ---
    "It does not work" is not a valid problem statement.

  8. #8
    Join Date
    Jul 2004
    Posts
    306
    Hmnnn I can't get anything useful out of that... the -l just gives hundreds of pages of BUFFER xxxx

  9. #9
    Join Date
    Sep 2003
    Posts
    237
    ARCHIVE.LOG in DSMI_LOG gives you timestamps of when logs were archived(when they became inactive). In db2 9 ,

    db2 list history archive log all for database hos (gives)

    Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
    -- --- ------------------ ---- --- ------------ ------------ --------------
    X D 20070322034203 1 U S0001594.LOG C0000001
    ----------------------------------------------------------------------------

    ----------------------------------------------------------------------------
    Comment:
    Start Time: 20070322034203
    End Time: 20070322034904
    Status: A
    ----------------------------------------------------------------------------
    EID: 2110 Location:

    If you want just a consitent state, what I do try to rollforward to a early time like
    db2 "rollforward db law to 2005-06-16-23.00.00.000000 USING LOCAL TIME and stop overflow log path(/dbhome/db2inst7/bas)"

    you get a message
    db2inst1@egulawdb:/DBHOME/db2inst1> op overflow log path (/DB97SYS1)" <
    SQL1275N The stoptime passed to roll-forward must be greater than or equal to
    "2005-09-18-10.23.20.000000", because database "LAW" on node(s) "0" contains
    information later than the specified time.

    you can use that time to rollforward to a consistent state by using
    db2 "rollforward db law to 2005-09-18-10.23.20.000000 using local time and complete overflow log path (/dbhome/db2inst7/bas)"
    mota

  10. #10
    Join Date
    Jul 2004
    Posts
    306
    Quote Originally Posted by dbamota
    ARCHIVE.LOG in DSMI_LOG gives you timestamps of when logs were archived(when they became inactive). In db2 9 ,

    db2 list history archive log all for database hos (gives)

    Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
    -- --- ------------------ ---- --- ------------ ------------ --------------
    X D 20070322034203 1 U S0001594.LOG C0000001
    ----------------------------------------------------------------------------

    ----------------------------------------------------------------------------
    Comment:
    Start Time: 20070322034203
    End Time: 20070322034904
    Status: A
    ----------------------------------------------------------------------------
    EID: 2110 Location:

    If you want just a consitent state, what I do try to rollforward to a early time like
    db2 "rollforward db law to 2005-06-16-23.00.00.000000 USING LOCAL TIME and stop overflow log path(/dbhome/db2inst7/bas)"

    you get a message
    db2inst1@egulawdb:/DBHOME/db2inst1> op overflow log path (/DB97SYS1)" <
    SQL1275N The stoptime passed to roll-forward must be greater than or equal to
    "2005-09-18-10.23.20.000000", because database "LAW" on node(s) "0" contains
    information later than the specified time.

    you can use that time to rollforward to a consistent state by using
    db2 "rollforward db law to 2005-09-18-10.23.20.000000 using local time and complete overflow log path (/dbhome/db2inst7/bas)"

    I had actually tried that, but it says the DB must be rolled forward to "end of logs" instead of gicing a timestamp

  11. #11
    Join Date
    Sep 2003
    Posts
    237
    Could you please give the rollforward commands you used and error messages you got?
    mota

Posting Permissions

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