Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2007
    Posts
    27

    Unanswered: DB2 Backup and Restore to another DB2

    Hi Guys,

    Can anyone help me regarding the DB2 Redirected Restore Scripts the reason is that i want to backup a DB2 and replicate it to another DB2 Server and eventually it is a Windows Server 2003.

    Regards,
    mabeljovan

  2. #2
    Join Date
    Mar 2006
    Posts
    104
    Hi,

    Check Db2 info center on details for 'restore' command.

    Basicaly take an offline backup and then restore using the redirect option.

    You may have to to do list tablespaces on original db to get the list of required table spaces.

    I have given below the script I used in Windows Db2 8.2

    db2 restore database mqsicmdb from d:\db2backups taken at 20040429 into mqsicmdt newlogpath R:\db2logs\mqsicmdb\ redirect

    db2 set tablespace containers for 0 using (path "s:\axisdatabases\tablespaces\mqsicmdb\syscatspace ")
    db2 set tablespace containers for 1 using (path "s:\axisdatabases\tablespaces\mqsicmdb\tempspace1" )
    db2 set tablespace containers for 2 using (path "s:\axisdatabases\tablespaces\mqsicmdb\userspace1" )
    db2 restore database mqsicmdb continue
    db2 rollforward database mqsibkdb complete

    Hope it is of help

  3. #3
    Join Date
    Jun 2007
    Posts
    27
    Thanks Sundaram but the problem is I don't have any offline backup i only have is the online backup.

  4. #4
    Join Date
    Jun 2007
    Posts
    12
    hey mabel, the redirected restore doesnt work for online backup...

    u need to have an ofline back up for using redirected restore.

    With online backup, if u will try to rollforward to end of logs or a paticular timestamp in redirected option... this doesnt work for you...

    one good option is,
    as u said u got an online backup...

    restore the backup and rollforward to end of logs on the same server...
    and now take an ofline backup
    u can use this ofline backup to use redirected restore on to other server...

    As of now u can follow sundaram's script for redirected restore...

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by gou007
    hey mabel, the redirected restore doesnt work for online backup...
    Are you sure about that?
    ---
    "It does not work" is not a valid problem statement.

  6. #6
    Join Date
    Jun 2007
    Posts
    12
    hey guys,

    ive referred about the redirected restore redirected restore supports both online and offline.

    these r the steps

    1. take an online/ofline backup for u'r actual database.

    2. now transfer the backup image over to target server, FTP the backup image.

    3.restore the database on target server using redirect option

    4.Define the containers

    5.continue the redirect restore.

    6. now u can connect to database ( it the backup is offline )

    7.if the backup is online u cannot connect, as the db was in rollforward
    pending the process continues

    8.use query status option in rollforward command to check which logs has to
    be rolledforward

    9. move the required log files from source database active log directory to the target database active log directory

    10 and then rolloforward to end of logs

    11. this time u should connect to database on target server.

    hope this helps u maybel,

Posting Permissions

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