Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2003
    Posts
    58

    Unanswered: Restoring a DB on a PC from an AIX backup

    I have DB2 UDB V7.2 FP7 running on an AIX machine that backs up
    nightly. These backup files look like this:

    MSTRLOCL.0.db2inst1.NODE0000.CATN0000.200309022300 00.001

    On my PC I have DB2 Personal Edition V7.2 FP7 and it backs
    up files like this:

    D:\dbData\backup\MSTRDATT.0\DB2\NODE0000\CATN0000\ 20030902\113613.001

    When I try and restore the database I get the following result:
    D:\dbData\backup>db2 restore database MSTRLOCL from D:\dbData\backup taken at 20030902230000
    SQL2542N No match for a database image file was found based on the source
    database alias "MSTRLOCL" and timestamp "20030902230000" provided.

    Here are the contents of the directory
    D:\dbData\backup>dir
    Volume in drive D is D_DRIVE
    Volume Serial Number is BD48-19C5

    Directory of D:\dbData\backup

    09/03/2003 10:03a <DIR> .
    09/03/2003 10:03a <DIR> ..
    09/02/2003 11:36a <DIR> MSTRDATT.0
    09/02/2003 10:48a 12,615,680 MSTRLOCL.0.db2inst1.NODE0000.CATN0000.200309021044 43.001
    09/03/2003 10:03a 16,809,984 MSTRLOCL.0.db2inst1.NODE0000.CATN0000.200309022300 00.001
    2 File(s) 29,425,664 bytes
    3 Dir(s) 9,238,683,648 bytes free


    What am I missing? Why cant I just give DB2 the file name instead of
    a date that it trys to match the files with?

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Restoring a DB on a PC from an AIX backup

    You cannot use db2 aix backup to restore to windows ...

    You may consider using db2look to extract the ddl and use
    db2move or export-load or export-import to get the data into the target

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    As Sathyaram has said, an DB2/AIX backup cannot be restored to DB2/Windows. The rules are that any DB2 backup from AIX, HP/UX, or Sun Solaris are compatable with eachother for DB2 restore purposes.

    DB2 backups from Linux can only be restored to Linux. DB2 backups from Windows can only be restored to Windows.
    Last edited by Marcus_A; 09-03-03 at 14:55.

  4. #4
    Join Date
    Aug 2003
    Posts
    33
    Is it because of the code page differences?
    mc

  5. #5
    Join Date
    Dec 2002
    Posts
    134
    Originally posted by mcdb2
    Is it because of the code page differences?
    mc
    I think the problem is the byte order for the numbers in memory(low byte to high vs high byte to low). Intel is different from the hardware used by most *nix. The thing I do not understand is why Linux(Intel) backup is not compatible with the Windows. Our development would be much easier if they were compatible.

    regards,
    dmitri

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Pre-Version 8, I remember only Soalris-HPUX could exchange the backups ...

    With Version 8, as marcus has suggested, AIX also been included

    Cheers

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  7. #7
    Join Date
    Aug 2003
    Posts
    58
    The DB2MOVE DBNAME EXPORT works fine, but the
    DB2MOVE DBNAME IMPORT was a bit tricky. I needed
    to create an empty DB first, and fix the authories by hand,
    and then fix the privleges by hand afterword. Not sure
    how to reload the data into an existing DB. Using
    DB2MOVE DBNAME LOAD may be the answer, but I am
    not convinced it will delete extra rows to make the DB's match.
    Kinda painful compared with BACKUP/RESTORE I had been using
    between two AIX machines.

Posting Permissions

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