Backup the SAMPLE database while it is offline. The backup image will be created in your current directory.
|[db2inst1@mercury adm]$ db2 backup db sample|
Screenshot: Offline Backup
where — SAMPLE.0.db2inst1.NODE0000.CATN0000.20110524073459.001 is the backed up file
Online Backup :
To take Backup the SAMPLE database to the /database1 and /datababase2 directories while the database is still accessible by other users.
|[db2inst1@mercury dbbackup]$ backup db sample online to /databasebkp1, /databasebkp2Where /databasebkp1, /databasebkp2 are directories where backup would be created|
List recent backups and where they are stored
|[db2inst1@mercury dbbackup]$ db2 list history backup all for sample|
Check the integrity of a backup image
|[db2inst1@mercury dbbackup]$ db2ckbkp SAMPLE.0.db2inst1.NODE0000.CATN0000.20110524073459.001
where SAMPLE.0.db2inst1.NODE0000.CATN0000.20110524073459.001 is the backup file