12 Backup/Restore MySQL Server
This chapter will describe in details how to use backup 4 business OBM to backup your MySQL server and how you can restore your MySQL server from the database backup files.
12.1 Requirements
- backup 4 business OBM must be installed onto the computer running MySQL server.
- Data from MySQL server will be backed up to a temporary directory before they are sent to backup 4 business Offsite Backup Server. Please make sure you have sufficient space on your computer to store these data when you run the backup job.
- There must be a MySQL account can be used to connect from localhost.
Add two new MySQL accounts for backup 4 business Backup Manager
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' -> IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost.localdomain' -> IDENTIFIED BY 'some_pass';
mysql> FLUSH PRIVILEGES;
They are superuser accounts with full privileges to do anything with a password of some_pass.
12.2 Overview
backup 4 business OBM will backup your MySQL server by taking the following steps:
- Run all Pre-Commands of this backup set
- All database(s) selected are backed up to a temporary directory specified in its backup set
- Run all Post-Commands of this backup set
- Upload all backup files from the temporary directory to an backup 4 business Offsite Backup Server
12.3 How to backup MySQL server
Please follow the instructions below to backup your MySQL server using backup 4 business OBM:- Open backup 4 business OBM
Right click backup 4 business OBM icon available in the system tray and choose [Open]
- From the Menu, Choose [Backup Set] -> [New] -> [MySQL Backup Set]
Create a backup set
- From the Menu, Choose [Backup Set] -> [New] -> [MySQL Backup Set]
- Enter a name for your backup set
- Enter the root password, the MySQL server TCP/IP port number and the path to MySQL backup utility (mysqldump)
- Select the database(s) to be backup
- Enter a temporary directory for storing the backup files before they are sent to an backup 4 business Offsite Backup Server, e.g. C:\Backup\MySQL
- Set the backup schedule for Database Backup
- Set the encryption algorithm, encryption mode and encrypting key for this backup set

(Hint: For maximum security, please select AES (Advanced Encryption Standard) Algorithm, CBC (Cipher Block Chaining) mode and use an encrypting key with more than 8 characters.)
- From the Menu, Choose [Backup Set] -> [New] -> [MySQL Backup Set]
- Run Backup
- Select the backup set you want to run on the left panel and press the [Start Backup] button (►)
- Select [Off-site Backup Server] to start backing up your files to an backup 4 business Offsite Backup Server and press the [OK] button
- You should get something similar to the screen shot below.
12.4 How to restore MySQL server
Please follow the instructions below to restore MySQL server from an backup 4 business Offsite Backup Server.- Download the database backup files to be restored from the backup 4 business Offsite Backup Server
Please refer to the [5.3 How to restore file] section for information on how to download backup files from backup 4 business Offsite Backup Server. - Restore the database named [db_name] from the database backup file [db_name.sql]:
- Connect to the MySQL server
shell> mysql - Create the database to be restored
mysql> CREATE DATABASE IF NOT EXISTS db_name - Restore the database backup file back into the MySQL server
shell> mysql db_name < db_name.sql
- Connect to the MySQL server
- Repeat the same procedure for each database to be restored to the MySQL Server.
- Completed
Top / Previous / Next / Table of Contents
