Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2009
    Posts
    31

    Unanswered: Redirected restore from mulitple backup image

    Hi Guys,

    I am new to this forum and looking for a help from the experts here on an issue I have run into. This needs to be resolved by Monday so an immediate reply will be sincerely appreciated. We have a 441 GB production database which we need to restore on another production server. I took a full offline backup of the database in the compressed mode and tried to FTP it to the new server but could only complete 20 percent in 8 hrs. Looking at the transfer rate I decided I will take mulitlple backup images of database and tranfer it parallely to the new box to make the transfer faster. But I am not sure if db2 supports redirected restore of mutliple backup images. Could somebody help me know if this could be a possiblity and if so how can I acheive that. Thanks in advance Sam

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,368
    Can't you store this image on a filesystem that is accessible by both servers?

    You can backup your db to multiple directories (db2 will split the image based on the number of dir you specify). But you need all of them on the target server in order to restore.

  3. #3
    Join Date
    Dec 2009
    Posts
    31
    Hi Bella,

    Thanks for responding. To be honest there is no such setup for us where we have a common filesystem accessible to both servers. But I am doing the exact same thing what you mentioned in your post about the mulitple backup images. I have 7 split images of the database in one dirpath on the target box. But my question is....is it possible to do a "redirected restore" with these split/multiple images of the database. Thanks

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,368
    You need to specify all images on the restore command (first step - restore... redirect). Here is an example:

    bkogan@panipuri /home/bkogan > db2 create db test automatic storage no
    DB20000I The CREATE DATABASE command completed successfully.

    bkogan@panipuri /home/bkogan > mkdir BK1 BK2 BK3

    bkogan@panipuri /home/bkogan > db2 "backup db test to /home/bkogan/BK1, /home/bkogan/BK2, /home/bkogan/BK3 compress"
    Backup successful. The timestamp for this backup image is : 20091219140910

    bkogan@panipuri /home/bkogan > ls -l BK*
    BK1:
    total 8744
    -rw------- 1 bkogan build 4476928 Dec 19 14:09 TEST.0.bkogan.NODE0000.CATN0000.20091219140910.001

    BK2:
    total 4360
    -rw------- 1 bkogan build 2232320 Dec 19 14:09 TEST.0.bkogan.NODE0000.CATN0000.20091219140910.002

    BK3:
    total 4360
    -rw------- 1 bkogan build 2232320 Dec 19 14:09 TEST.0.bkogan.NODE0000.CATN0000.20091219140910.003


    bkogan@panipuri /home/bkogan > db2 "restore db test from /home/bkogan/BK1, /home/bkogan/BK2, /home/bkogan/BK3 into test2 redirect"
    SQL1277W A redirected restore operation is being performed. Table space
    configuration can now be viewed and table spaces that do not use automatic
    storage can have their containers reconfigured.
    DB20000I The RESTORE DATABASE command completed successfully.

    bkogan@panipuri /home/bkogan > db2 "set tablespace containers for 2 using (path home/bkogan/test2)"
    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    bkogan@panipuri /home/bkogan > db2 restore db test continue
    DB20000I The RESTORE DATABASE command completed successfully.

  5. #5
    Join Date
    Dec 2009
    Posts
    31
    thank you so much Bella this helps a lot I did try that on the same server with my test database and it didnot work so I was kind a dissappointed. But I am glad this is a solution for it....thanks Sam

Posting Permissions

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