The supported platforms for DB2 backup and restore operations can be grouped into one of three families:After hours of fiddling with DB2 manuals and succeeding partially in moving the data from an DB2 in AIX 64 bits to a Windows 32 bits machune, I eventually stumbled upon this great developerWorks article, fittingly titled: Using DB2 utilities to clone databases across different platforms.
- Big-endian Linux® and UNIX®
- Little-endian Linux and UNIX
Essentially it uses a combination of the “db2move” and “db2look” commands, like this:
Exporting the data
To export the contents of the database, change to the directory where the exported directory where the files should be written and run:
db2move WAREHOUS export -sn ITMUSERwhere WAREHOUS is the name of the database I was exporting and ITMUSER the schema for it.
db2look -d WAREHOUS -e -a -o db2look.sql
Importing the data
Copy over the files to the target machine and change to the directory where the exported files are. Then run the command:
db2 “create db WAREHOUS”where WAREHOUS is the name of the database you are importing.
db2 –tvf db2look.sql
db2move WAREHOUS import
You can use a different database name, but you need to edit the first line of the db2look.sql file to match the name.