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 > Regarding backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-11-10, 04:30
ashwinjoshi ashwinjoshi is offline
Registered User
 
Join Date: Oct 2010
Posts: 18
Regarding backup

Hi,

I have 2 full database backups like

VISILOG2.0.db2inst1.NODE0000.CATN0000.201011092204 26.001
VISILOG2.0.db2inst1.NODE0000.CATN0000.201011100145 39.001

and when i use timestamp to restore database in new database (test1)
$db2 restore db visilog2 incremental taken at </data1/db2inst1/VISILOG2.0.db2inst1.NODE0000.CATN0000.201011100145 39.001> into test1

I am getting following error

SQL2508N The Database Restore timestamp parameter "test1" is not valid.

Thanks for the help
Reply With Quote
  #2 (permalink)  
Old 11-11-10, 04:53
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
Uhu

The Information Center says:

Repeat the restore command with a valid Value for the timestamp parameter.

Does this work?

db2 restore db visilog2 incremental taken at VISILOG2.0.db2inst1.NODE0000.CATN0000.201011100145 39.001 into test1
Reply With Quote
  #3 (permalink)  
Old 11-11-10, 04:57
ashwinjoshi ashwinjoshi is offline
Registered User
 
Join Date: Oct 2010
Posts: 18
The command mentioned db2 restore db visilog2 incremental taken at VISILOG2.0.db2inst1.NODE0000.CATN0000.201011100145 39.001 into test1 doesnt work...

Dont know where I am going wrong!!!
Reply With Quote
  #4 (permalink)  
Old 11-11-10, 05:09
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
On my system a restore would look like this:

RESTORE DATABASE Database INCREMENTAL AUTOMATIC TAKEN AT 20101005170010;

Does this work?

db2 restore db visilog2 incremental taken at 201011100145 into test1

Last edited by DB_N00b; 11-11-10 at 05:15.
Reply With Quote
  #5 (permalink)  
Old 11-11-10, 14:56
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
The first place it seems you are going wrong is not looking the command up in the manual (or if you have, understanding the parameters). Here is a like to RESTORE DATABASE - IBM DB2 9.7 for Linux, UNIX, and Windows in the Information Center.

restore db visilog2 incremental taken at </data1/db2inst1/VISILOG2.0.db2inst1.NODE0000.CATN0000.201011100145 39.001> into test1

The parameter Taken At needs a timestamp after it. That is found as this 20101110014539 from the backup file name.

It is usually best to let DB2 know where this backup file is located. Since yours appears to be on disk, that would be the FROM parameter which needs a Device or Directory.

RESTORE DB VISILOG2 INCREMENTAL FROM /DATA/DB2INST1 TAKEN AT 20101110014539 INTO TEST1

PS, I am not sure how well this will work. It looks like you are restoring an Incremental copy of one database into another database. This is best done with a Full Backup and not an Incremental. Since I have never done this, I am assuming (if it will work), that it can find and has access to the Full Backup created before the Incremental Backup (since it will have to start the recovery process form that Full Backup).
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