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 > What is wrong with this Redirected restore command - UDBv8.2 fp14 on Linux

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-25-07, 23:07
pagwu pagwu is offline
Registered User
 
Join Date: Mar 2007
Posts: 70
What is wrong with this Redirected restore command - UDBv8.2 fp14 on Linux

Hi all,
This is a very urgent issue for my team. We are trying a Redirected restore the most current online DB2 UDBv8.2 backup copy from

prod disk to disk on another/test instance. Our environment is RedHat Linux. We have tried the following with failure: (1)

[db2prd1@aaanpudb1 /]$ db2 restore db AANPDM01 from "/stuff/ftp/bkp" taken at 20070525164103 to "/dmd/data" into AANNDM01

NEWLOGPATH "/dmt/log" redirect without rolling forward;

SQL1052N The database path "/dmd/data" does not exist.

Note: "/dmd/data" does not exist in the source DB2 Linux Production environment but categorically exist in the target DB2 Linux

Test environment. What I need is to restore restore from production to test.
[db2prd1@fsfnpudb1 /]$ <== prod_instance_DB
[db2inst1@target_server <== systest_instance_DB

(2) We then tried to sFTP the backup image copy to the test environment but not having much luck either. We got repeated failure

with this message:

sftp> put FSNPDM01.0.db2prd1.NODE0000.CATN0000.2007092504450 6.001
Uploading AANPDM01.0.db2prd1.NODE0000.CATN0000.2007092504450 6.001 to

/db2home/db2inst1/AANPDM01.0.db2prd1.NODE0000.CATN0000.2007092504450 6.001
AANPDM01.0.db2prd1.NODE0000.CATN0000.2007092504450 6.001 12% 3972MB 4.2MB/s 1:54:37 ETA. Couldn't write to

remote file
"/db2home/db2inst1/FSNPDM01.0.db2prd1.NODE0000.CATN0000.2007092504450 6.001": Failure ID mismatch (127219 != 3)


Could any of our redirected restore gurus please step in and shed some light on this technical matter! This will be highly

appreciated!!

Sincerely

okonita
Reply With Quote
  #2 (permalink)  
Old 09-26-07, 02:07
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
------------------------------------------------

Last edited by grofaty; 09-26-07 at 02:37.
Reply With Quote
  #3 (permalink)  
Old 09-26-07, 03:09
pagwu pagwu is offline
Registered User
 
Join Date: Mar 2007
Posts: 70
did you want to say something? Please do.
Reply With Quote
  #4 (permalink)  
Old 09-27-07, 03:16
nitingm nitingm is offline
Registered User
 
Join Date: Jul 2003
Location: Austin, TX, USA
Posts: 278
General Tips

Hi,

These are the guidelines we usually follow. I might be getting to basic here but am hopeful that might help u..

1. Take a full offline backup of prod. This will create an image file.

2. Initiate a FTP of the image file to the server you wish. Note here I would prefer if you have admin user access, we usually do it by root.

3. On the filesystem you have ftp'd the image, chmod it to 755 that will allow all users to read data from the image.

4. If you are still doubtful that the image has not been ftp'd successfully you can issue the db2ckbkp (check backup) command to verify the image.

5. Now perform the redirected restore as instance owner preferably or a userid that has sysadm priviliges. Also ensure that the instance userid has priviliges to read from the source filesystem and write to the target filesystem

db2 "restore db <dbname> from <backup location> taken at <backup
timestamp> to <new location> into <newdbname> redirect"

For example

db2 "restore db test from /data/backup taken at 20070525164103 to /data/newdb into newdb redirect"

6. Once this goes through you will need to redefine all the containers. You will need to get a list of tablespaces and define the new container paths based on the container id's.

7. Then you will have to issue the following command

db2 "restore db test continue"

8. Once that is done you will need to issue

db2 rollforward db newdb stop.

**** If you need to switch off online logging then you can go ahead and update db cfg to set userexit and logretain off*****

9. Once that is done you can use the db2 update db cfg comamnd to update the LOGPATH


I have attached sample script depicting steps 5,6 & 7 . Hope that should help u..
Attached Files
File Type: txt redirected_example.txt (1.4 KB, 65 views)
__________________
HTH

Nitin

Ask the experienced rather than the learned
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