This article describes how to restore a database correctly based on logs and full backup files, if you are interested in the correct recovery steps of the database based on the logs and full backup files of the DB2 database, you can click to view the following articles.
Databases, logs, file databases, logs, files
Background 1:
A) perform an online full backup of the DB2 database
- DB2 backup db online to 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 from taken at ;
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 to end of logs and stop
The above content introduces how to recover a database in a DB2 database based on logs and full backup files. I hope you will gain some benefits.
The above content describes how to recover a database in a DB2 database based on logs and full backup files. We hope this will help you in this regard.