HP OSMS Blueprint: HP Manageability Value-Add Software for Open Source Middleware Stacks

5. Import the MySQL slave server as a client of the Data Protector Cell Manager as shown in
Figure 7.
Figure 7 Importing a Client
Backing Up Data
There are two parts to backing up your data: first, the extraction of data from the database and,
second, the integration of the database back up tool into the process.
To Extract Data from the Database
1. To stop the slave replication, enter the following command:
mysql> STOP SLAVE SQL_THREAD;
2. After the slave thread has been stopped, 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.
For MyISAM tables, use the following command:
# mysqldump -u osmusr -p osmpass osmsdb customer > /tmp/customer.sql
For InnoDB tables, use the following command:
# mysqldump -u osmusr -p osmpass --single-transaction osmsdb \
customer > /tmp/customer.sql
In the example, the database user for backup is osmusr with the password osmpass. Prior
to backing up, the user must be created and the proper privileges granted for lock tables
and select on the osmdb database . The name of the test table is customer in the osmsdb
database. The backup data is stored in the /tmp/customer.sql file.
22