Can I include logs while taking a backup? OR I have an online database backup image that was taken with the include logs option. How can I restore and only apply the logs stored in this backup image?
While taking backup you can specify the option INCLUDE LOGS. When you specify this option, the backup utility will truncate the currently active log file and copy the necessary set of log extents into the backup image. More information on this here: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/c0011559.htm You will need to create an empty directory and extract the log to this directory during the restore. Then, issue the rollfoward command and point DB2 to this directory using the overflow log path option. Here is an example: > DB2 backup db test1 online include logs Backup successful. The timestamp for this backup image is : 20080318084101 > mkdir rest_logs > DB2 restore db test1 logtarget /home/bkogan/rest_logs SQL2539W Warning! Restoring to an existing database that is the same as the backup image database. The database files will be deleted. Do you want to continue ?
Related Questions
- Can I include logs while taking a backup? OR I have an online database backup image that was taken with the include logs option. How can I restore and only apply the logs stored in this backup image?
- Can you restore a database from a backup image taken on a 32 bit level into a 64 bit level or vice versa?
- How secure is my data while taking a backup or restore of the MS Exchange Server database?