Backup/Restore MySQL Server
This chapter will describe how to use JUSTbackupz to backup your MySQL and how you can restore your MySQL from the backup files.
Requirements
- JUSTbackupz 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 JUSTbackupz Offsite Backup Server (OBS). 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 that can be used to connect from localhost
Add two new MySQL accounts for JUSTbackupz Backup Manager
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' > IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'.localhost.localdomain > IDENTIFIED BY 'some_pass';
mysql> FLUSH PRIVILEGES;
They are superuser accounts with full privileges to do with a password of some_pass.
Overview
JUSTbackupz OBM will back up your MySQL server by taking the following steps:- Run all Pre-Commands of this backup set
- All databases 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 JUSTbackupz Backup Server
How to Backup MySQL server
Please follow the instructions below to backup your MySQL server using JUSTbackupz OBM:- Open Just backupz
Right click JUSTbackupz 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 anf the path to MySQL backup utility (mysqldump)
- Select the database to be backup

- Enter a temporary directory for storing the backup files before they are sent to an JUSTbackupz OBS, 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.)
- 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 JUSTbackupz OBS and press OK

- You should get something similar to the screen shot below

How to Restore MySQL server
Please follow the instructions below to restore MySQL server from an JUSTbackupz OBS- Download the database backup files to be restored from JUSTbackupz OBS
- Restore the database named [db_name] from the database backup file [db_name.sql]:
- Connect to th MySQL server
shell>mysql - Create the database to be restored
mysql>CREATE DATABASE IF NOT EXISTS db_name - Restore the database backup file into the MYSQL server
shell>mysql db_name db_name.sql
- Repeat the same procedure for each database to be restored to the MySQL Server
- Completed











