Topic
5 replies Latest Post - ‏2013-01-22T14:27:43Z by SystemAdmin
Harz
Harz
37 Posts
ACCEPTED ANSWER

Pinned topic restore quirks

‏2006-12-04T16:54:55Z |
I am testing disaster recovery of DB2.

I have made a database backup file called "TEST.0.DB2.NODE0000.CATN0000.20061203233311.001".

This file has been transfered to another server. There I have started the DB2 control center > Create Database from File...

At 2. Available Images I selected File System. Then I would like to select my backup file but it is not shown in the select dialog (???). When I manually enter "c:\TEST.0.DB2.NODE0000.CATN0000.20061203233311.001" I can continue and the source is added to the source window. Now I can select time and date. These values are not read from the backup file (???). When I manually enter values I can continue. But after pressing finish I get the error:

SQL2036N The path for the file or device
"C:\TEST.0.DB2.NODE0000.CATN0000.20061204164738.001" is not
valid.

Is it really that these tools are disfunctional and inconvenient - or I am doing something terribly wrong here?
Updated on 2013-01-22T14:27:43Z at 2013-01-22T14:27:43Z by SystemAdmin
  • Harz
    Harz
    37 Posts
    ACCEPTED ANSWER

    Re: restore quirks

    ‏2006-12-04T18:13:37Z  in response to Harz
    This one I found out for myself:

    PATH means just the directory not the FILEPATH. So the file has to be placed into an directory like DB2BACKUP. With the given db name, directory and date the restore is completed successfully.

    Things like that confuse me. I remember another place in the installation where I was asked for the database path where actually the drive was meant...
    • ocgstyles
      ocgstyles
      472 Posts
      ACCEPTED ANSWER

      Re: restore quirks

      ‏2006-12-04T19:38:14Z  in response to Harz
      That is correct. You only need to refer to the path to the backup file.
      The TAKEN AT modifier of the restore command tells which to use (if you had more than one backup file in the directory).

      The database path is different for different platforms. For AIX/Linux, it is a path (/home/db2admin), and for Windows, its a drive (C:)
      • Keith
  • SystemAdmin
    SystemAdmin
    5837 Posts
    ACCEPTED ANSWER

    Re: restore quirks

    ‏2007-05-01T21:52:36Z  in response to Harz
    After days of pulling my hair out with the same problem I ran into a statement in the IBM restore command definition which says for Windows do not specified the IBM generated data in the path. Just the drive and high level directories are accepted. For me it was E:\DB2Backups
    • SystemAdmin
      SystemAdmin
      5837 Posts
      ACCEPTED ANSWER

      Re: restore quirks

      ‏2013-01-22T14:27:37Z  in response to SystemAdmin
      you may also try this command to restore your DB from Backup

      db2 "restore database TESTBACKUP from /home/db2inst1/ TAKEN AT 20130122141102 INTO NEWDB REPLACE EXISTING"

      Mark
    • SystemAdmin
      SystemAdmin
      5837 Posts
      ACCEPTED ANSWER

      Re: restore quirks

      ‏2013-01-22T14:27:43Z  in response to SystemAdmin
      you may also try this command to restore your DB from Backup

      db2 "restore database TESTBACKUP from /home/db2inst1/ TAKEN AT 20130122141102 INTO NEWDB REPLACE EXISTING"

      Mark