Monday, February 14, 2005

Include logs in online backup (As of DB2 8.2)

db2 BACKUP DB “dbname” ONLINE TO “backupdir” INCLUDE LOGS

Above command includes the logs required to restore the database and bring back the database to a consistent point.

And to restore

db2 RESTORE DB “dbname” FROM “backupdir” LOGTARGET “logdir”

ROLLFORWARD DB “dbname” TO END OF LOGS AND STOP OVERFLOW LOG PATH “logdir”

To restore just the logs from the backup image

db2 restore db “dbname” logs from “backupdir” logtarget ‘logdir”

1 comment:

Dan Blogger said...

Hello,

Even if I am not very good expresing myself in writing, I really like when someone is able to put in words simple and clear concepts the way you are doning it...

I'm working on a data storage site. It is not easy to find good content for data storage websites but I try to do my best...I also have a blog there