DB2 Backup & Restore

Set backup with TSM : http://www.ibm.com/developerworks/servicemanagement/library/sm-tsm-db2/

Logical Backup

1. Create DDL for the whole database :

2. Export the database :

3. Transfer the files ddl_<DBNAME>.sql and all exported files to another instance/server

4. Recreate database and import the data :

6. Verify integrity on tables with check constraint : 7. Refresh MQTs :

EXPORT/LOAD

Compressed export/load :

Create exception tables :

Set integrity with exceptions to exception table created previously :

Optim High Performance Unload

Unload table from backup image :

Physical Backup

Backup history (from history file) :

Offline backup to TSM/disk :

Online backup to TSM/disk :

Restore DB2 database

http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.ha.doc/doc/c0011981.html?cp=SSEPGG_9.7.0

Partial redirected rebuild of database (selected tablespaces) :

Restore of Log files from a backup

Speed up restore

Partial redirected rebuild of database (selected tablespaces) with generated script

Cross-node TSM restore/recovery

1. Restore the DB using previous authorization :

2. Grant access to different node/user on source server :

3. Query backup images on target server :

4. Restore the backup image from source server :

Tablespace backup/restore

!! DB MUST BE IN LOG ARCHIVING MODE !!!

1. Take offline/online tablespace level backup :

2. Restore tablespace from backup (offline/online) :

3. Rollforwad restored tablespaces :

4. Take restored tablespace from backup_pending state :