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 > Restoring using backup image

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-17-04, 17:26
dsusendran dsusendran is offline
Registered User
 
Join Date: Apr 2004
Location: Inside Intel
Posts: 165
Restoring using backup image

Hi all,

DB2 8.1.5 on Win 2000

I was just wondering if it was possible to restore a database using the backup image? The reason is, i want to have another copy of the database in another machine which is not in the same domain.
Other question is, can i use the same image to restore on a different operating system.

Thanks in advance,
Newbie
Reply With Quote
  #2 (permalink)  
Old 05-17-04, 18:08
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
the backup image from the same OS can be used for recreating the database at other machine.
Linux is considered a different OS than Unix.
HP-UX and Sun OS , I have used it for backing and restoring.
Never did it from aix to other unix system, but it can be done.

regards,

mujeeb
Reply With Quote
  #3 (permalink)  
Old 05-18-04, 08:49
dsusendran dsusendran is offline
Registered User
 
Join Date: Apr 2004
Location: Inside Intel
Posts: 165
Smile Thanks!

Mujeeb,

Do we have to get hold of the log files too along with the backup image? -- Considering i did a offline backup. If so what files need to be used.

Thanks in advance.
Newbie
Reply With Quote
  #4 (permalink)  
Old 05-18-04, 09:01
sathyaram_s sathyaram_s is online now
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
If you have an offline backup, you do not need the log files ..

For online backup, you do need log files

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 05-18-04, 09:08
dsusendran dsusendran is offline
Registered User
 
Join Date: Apr 2004
Location: Inside Intel
Posts: 165
Cool Thanks!

Thank you for the prompt reply Sathyaram.

Newbie
Reply With Quote
  #6 (permalink)  
Old 05-18-04, 11:31
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
Sathayam , you do need log files , no matter that you have done online or offline backup,If your original database is in rollforward mode (userexit or logretain on) , you want to rollforward, and your restore database will be in the same state(after the restore).
Now after the restore you need log files for rollforward, only if it is allowed.
You can have an offline backup , but if you don't want to rollforward then you don't need these log files.
Incase of online, your original database must be in rollforward mode, so you must need log files to rollforward the database, so it must be consistent.

regards,

mujeeb
Reply With Quote
  #7 (permalink)  
Old 05-18-04, 15:46
dsusendran dsusendran is offline
Registered User
 
Join Date: Apr 2004
Location: Inside Intel
Posts: 165
Smile Timestamp

How do i find the timestamp of the image? Also do i copy all the log files too?

Thanks in advance,
Newbie
Reply With Quote
  #8 (permalink)  
Old 05-18-04, 16:57
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
two ways.
1. list history file command for backup.
2. the image file name contains the timestamp it is before the sequence no
.....< timestamp>.<seq no> . you will see instancename,type of backup,database name.

you need the archive file and the online log file if you want to perform rollforward operation, otherwise you don't need that.

regards,

mujeeb
Reply With Quote
  #9 (permalink)  
Old 05-19-04, 10:48
dsusendran dsusendran is offline
Registered User
 
Join Date: Apr 2004
Location: Inside Intel
Posts: 165
Smile Thanks

Can you give me an example to find the timestamp? I did not understand.

Say the name of the image is 140005.001.

Appreciate your help dude. Thanks.
Newbie
Reply With Quote
  #10 (permalink)  
Old 05-19-04, 17:58
sathyaram_s sathyaram_s is online now
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Looks like you are on windows ...

If you have told , backup database sample to C:\backup

Then under C:\backup , you will find a directory SAMPLE.x (x is a number dependent on the type of backup) ... You will have to copy this directory to the target machine for you to be able to restore

If you copy this directory structure, to C:\resotre\

Then issue restore database sample from C:\restore taken at <timestamp>

For the timestamp, the above is at time 14.00.05 ... For date, look at the name of the directory the above file is under ...

When rolling forward, remember one thing .... You always use the UTC Time (not the local time). This was true till version 7, and for version 8 this is the default ...

If you want to specify the local time, then use 'use local time' in the command

rollforward database sample to 2004-05-19.20.00.00.000000 use local time


Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #11 (permalink)  
Old 05-26-04, 11:25
dsusendran dsusendran is offline
Registered User
 
Join Date: Apr 2004
Location: Inside Intel
Posts: 165
Exclamation Restoring from backup image

Quote:
Originally Posted by sathyaram_s
Then issue restore database sample from C:\restore taken at <timestamp> ....
Sathyaram,

I have some problems issuing restore command. Things i have done so far:

1. I copied the backup image from the server to my PC.

Location of the image on my PC:
C:\DB2\BACKUP\GROUP.0\DB2\NODE0000\CATN0000\200405 18\151312.001
-- (Name of the DB is GROUP)

2. Issued the following command:

RESTORE DATABASE GROUP FROM "C:\DB2\BACKUP\" TAKEN AT 20040518151312;

I got this error code below:

Error code:
The database alias or database name "GROUP" was not found at the remote node.

Thanks in advance,
Newbie

I restarted the PC and issued the same above command, it is giving me another error code: SQL0298N Bad container path.

Additional Information:

DB2 ESE 8.1.0 on my PC which runs on Windows XP Professional. - Target
DB2 Connect Edition 8.1.5 on my Server which runs on Windows 2000. - Source

Last edited by dsusendran; 05-26-04 at 11:40. Reason: New Error
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