Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2004
    Location
    Inside Intel
    Posts
    165

    Unanswered: 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

  2. #2
    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

  3. #3
    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

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  5. #5
    Join Date
    Apr 2004
    Location
    Inside Intel
    Posts
    165

    Cool Thanks!

    Thank you for the prompt reply Sathyaram.

    Newbie

  6. #6
    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

  7. #7
    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

  8. #8
    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

  9. #9
    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

  10. #10
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  11. #11
    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 12:40. Reason: New Error

Posting Permissions

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