HP-UX OSRA for Web Services 2.5 Blueprint and Configuration Guide
Figure 4-5 Adding a Client 3
Backing Up Data
The following procedures describe the extraction of data from the database and the integration
of the database back up tool into the process.
Extracting Data from the Database
1. Stop the slave replication, by entering the following command:
mysql> STOP SLAVE SQL_THREAD;
2. Flush the tables to save the pending changes to disk, by entering the following command:
mysql> FLUSH TABLES;
3. Use the mysqldump command to place the data to be backed up in a file on the slave server.
Prior to backing up, the user must be created and the proper privileges granted for lock
tables and select on the osradb database. In the following example, the user for backup is
osrausr and the password is osrapass. The name of the test table is customer in the
osradb database, and the backup data is stored in the /tmp/customer.sql file.
For customer tables, use the following command:
# mysqldump -u osramusr -p osrapass osradb customer >
/tmp/customer.sql
For InnoDB tables, use the following command:
# mysqldump -u osramusr -p osrapass --single-transaction osradb \
customer > /tmp/customer.sql
42 MySQL Tools and Tips