The following articles mainly describe the actual database recovery operations of DB2 Based on logs and full backup files, the following is a description of the actual operations performed by DB2 to recover the Database Based on logs and full backup files. We hope this will help you in your future studies.
Databases, logs, file databases, logs, files
Background 1:
A) perform an online full backup of the DB2 database
- DB2 backup db <dbname> online to <dir/dev> include logs;
B) back up the archive logs generated in the Directory D: \ DB2 \ NODE0000 \ SQL00001 \ SQLOGDIR,
If the database crashes one day, you can recover the database by using all the backup files and the archive logs backed up later,
And restore the database to the time point before the crash.
The procedure is as follows:
- DB2 restore db <dbname> from <dir/dev> taken at <date-time>;
C) After performing the preceding operations, the database is in the STANDBY state and then copies the archived backup logs to the database log directory,
Roll back the database so that the database can be recovered to the point before the crash.
- DB2 rollforward db <dbname> to end of logs and stop
The above content is an introduction to the database recovery of DB2 Based on logs and full backup files. I hope you will gain some benefits.
The above content describes how DB2 restores the Database Based on logs and full backup files. We hope to help you in this regard.