bash>mysqld log bin=/home/itso/mysql/logs
Restore backup data after crash recovery; this can be done using:
mysqlimport
or
LOAD DATA INFILE
,
bash>mysqlimport itsodb tablename.txt
Re running the update binary logs that occurred after backup
This can be done by running the
mysqlbinlog
command and redirecting
the output to mysql using Linux pipes as shown below:
bash>mysqlbinlog hostname bin.[0 9]* | mysql
8.1.2 DB2 UDB database recovery
DB2 UDB supports database recovery using database backup in conduction with
two recovery logs: active logs and archived logs:
Active logs
Active logs contain current transaction data. These logs are required in crash
recovery.
Achieved logs
Archived logs contain committed transactions. These logs are used in
rollforward recovery, which can recover the database to the state immediately
before the failure. Archie logging can be enabled by setting
logretain
and
the userexit
database configuration parameter to ON.
Database backup
Backup DB2 UDB database can use DB2
backup
command. This command can
be used to back up database to disk, tape, or names pipes in UNIX. DB2 UDB
supports both offline and online backup.
db2>backup database itsodb2 to /home/itsodb/backup
In addition to backing up the entire database every time, DB2 UDB also supports
incremental backup where you can back up large databases on a regular basis
incrementally. This requires a
trackmod
database configuration parameter to be
set to
yes
. Incremental backup can be a
cumulative backup,
which stores data
changes since the last successful full backup, or
delta backup
which is the last
successful backup irrespective of whether that backup was full, delta, or
cumulative. Figure 8 1 and Example 8 1 show the cumulative and delta backup
technique.
Chapter 8. Database administration
237
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved