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

  1. backup 4 business OBM must be installed onto the computer running MySQL server.
  2. 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.
  3. 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:

  1. Run all Pre-Commands of this backup set
  2. All database(s) selected are backed up to a temporary directory specified in its backup set
  3. Run all Post-Commands of this backup set
  4. 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:
  1. Open backup 4 business OBM

    Right click backup 4 business OBM icon available in the system tray and choose [Open]

  2. From the Menu, Choose [Backup Set] -> [New] -> [MySQL Backup Set] Create a backup set
    1. From the Menu, Choose [Backup Set] -> [New] -> [MySQL Backup Set]

    2. Enter a name for your backup set

    3. Enter the root password, the MySQL server TCP/IP port number and the path to MySQL backup utility (mysqldump)
    4. Select the database(s) to be backup

    5. 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
    6. Set the backup schedule for Database Backup

    7. 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.)
  3. Run Backup
    1. Select the backup set you want to run on the left panel and press the [Start Backup] button (►)
    2. Select [Off-site Backup Server] to start backing up your files to an backup 4 business Offsite Backup Server and press the [OK] button

    3. 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.
  1. 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.
  2. Restore the database named [db_name] from the database backup file [db_name.sql]:
    1. Connect to the MySQL server

      shell> mysql
    2. Create the database to be restored

      mysql> CREATE DATABASE IF NOT EXISTS db_name
    3. Restore the database backup file back into the MySQL server

      shell> mysql db_name < db_name.sql
  3. Repeat the same procedure for each database to be restored to the MySQL Server.
  4. Completed

Top / Previous / Next / Table of Contents