One, offline backup
DB2 List database directory-----See which databases you need to back up
DB2 Disconnect current-----Disconnect from the database, and if there are other services connected, you also need to disconnect
DB2 list application for DB dbname------View all connections
DB2 Force application All-----forcing all apps to disconnect from the database
DB2 Backup DB dbname directory-----Back up the database, a timestamp is returned when the backup succeeds
DB2 Restore DB dbname from backup file directory taken at time-----Recovery database
Second, offline backup
First open the database configuration parameters that support Online backup
DB2 Update DB CFG for dbname using UserExit on-----Enable user egress
DB2 Update DB CFG for dbname using Logretain on-----Enable archive logging
DB2 Update DB CFG for dbname using TRACKMOD on-----Enable incremental backup functionality
DB2 Backup DB dbname Online
Third, restart the database
DB2 list application for DB dbname-----See if there are active connections
Db2stop-----Stop Instance
Db2start-----Launch Instance
DB2 list Active Databases-----to see if there is an active database
DB2 Activate database dbname-----activating target databases
DB2 Database Backup