Backup, Restore and Check the History of DB2 AIX

Backup, restore and check history that I often use. Login using DB2 user.

Interactively backup database and logs:

db2 backup database <dbname> online to </filesystem> include logs

To submit into background job:

nohup db2 backup database <dbname> online to </filesystem> include logs &

To restore, you can use:

db2 restore database RP1 from </filesystem> taken at <yyyymmddhhmmss>
or for background job:
nohup db2 restore database RP1 from </filesystem> taken at <yyyymmddhhmmss> &

To check backup/restore process:

db2top and then press u
or
db2 list utilities show detail

To find out the history of backup activities by:

db2 list history backup since <yyyymmdd> for <dbname>

Leave a Reply