HP-UX OSRA for Web Services 2.5 Blueprint and Configuration Guide
only on the binary log files, master.info and relay-log.info. Restoration of all data in the
event of a disaster is achieved by first restoring the full data backup, and then restoring all the
binary log updates, which are used to recover the database to the point of the binary log flush.
Restoring Data
Restore the data file and binary log files to both the master server and slave server. All database
data is recreated using the extracted data file and the binary log files.
1. Stop the replication between master server and slave servers. For more instructions, see
MySQL 5.0 Reference Manual, at http://dev.mysql.com/doc/refman/5.0/en/index.html
2. Restore the latest database data file and binary log files to both master server and slave
server using Data Protector, as shown in Figure 4-7.
Figure 4-7 Restoring Files
3. Reconstruct all database data on the master server and slave server to the point in time when
the binary log flush occurred, by entering the following command:
# mysql -u osrausr -p osrapass osradb < /tmp/customer.sql
4. Replay the binary log files on the master server and slave server by entering the following
command:
# mysqlbinlog mysql-bin.000002|mysql -u osrausr -p osrapass
5. Restore the files master.info and relay-log.info on the slave server, so they are
consistent with the binary log files that have been restored on the master server.
6. Restart the replication.
44 MySQL Tools and Tips