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 > Redirected restore from mulitple backup image

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-19-09, 12:58
dbsam dbsam is offline
Registered User
 
Join Date: Dec 2009
Posts: 31
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
Reply With Quote
  #2 (permalink)  
Old 12-19-09, 13:51
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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.
Reply With Quote
  #3 (permalink)  
Old 12-19-09, 14:01
dbsam dbsam is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 12-19-09, 14:15
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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.
Reply With Quote
  #5 (permalink)  
Old 12-19-09, 14:30
dbsam dbsam is offline
Registered User
 
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
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