9.1 MySQL Backup
First, please refer to Chapter 4 Configuring Instances to configure the corresponding MySql instance information for the source Client. Just as a Client has multiple MySql instances, it can be configured multiple times.
You can also manually query Mysql-related parameters.
Login to MySql:
mysql -u root -pQuery:
SHOW VARIABLES LIKE 'port';
SHOW VARIABLES LIKE 'socket';
SHOW VARIABLES LIKE 'basedir';
SHOW VARIABLES LIKE 'datadir';The result should be like:
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
+---------------+-----------------------------+
| Variable_name | Value |
+---------------+-----------------------------+
| socket | /var/run/mysqld/mysqld.sock |
+---------------+-----------------------------+
+---------------+------------------+
| Variable_name | Value |
+---------------+------------------+
| basedir | /usr/ |
+---------------+------------------+
+---------------+------------------------+
| Variable_name | Value |
+---------------+------------------------+
| datadir | /var/lib/mysql/ |
+---------------+------------------------+The above results can be compared with the automatic scanning results, and the query results should prevail.
After configuring the instance:
Start creating a new MySql plan from the left navigation bar [Plan] - [Database Backup] - [+], in 5 steps:
The first step is to select the data content.
Name the plan and select the data type MySql. After selecting Client and Instance, the system will automatically scan all databases under that instance (note that MySql's system databases such as MySQL/Sys have been hidden). The backup data list can be expanded later.
After selecting the database you need to backup, click [Next]:
Step two, select storage:
Please select the storage pre-configured in Chapter 5 Configuring Storage . Click [Next] to continue:
Step three, set a time plan.
Refer to Chapter 6, Section 1, Automatic Trigger of Backup Plan to configure the trigger time of the plan.
For MySql instance level backups , you can choose either "Full" only or "Full + Incremental";
For MySQL repository level backups , only full backups can be selected, please choose according to your needs.
Click [Next] to continue:
Fourth step, advanced options:
Please refer to Chapter 6, Section 4, Advanced options for backup plans and Section 5, before and after scripts to check.
There are some dedicated parameters for Mysql backup:
The --hex-blob, --opt, and --single-transaction parameters are enabled by default. --routines --events and --set-gtid-purged=OFF parameters are also provided for selection.
Result explanation:
gtid_modevalue should beONorOFF, if it isON, the GTID feature is enabled.enforce_gtid_consistencyvalue should beON, indicating MySQL forces GTID consistency.The output of SHOW STATUS Iike'Gtid% ';displays the GTID-related status variables to help confirm that GTID is running.
Click [Submit] to save the policy in the fifth step.
You can then refer to Chapter 6, Section 2, Manual Trigger of Backup Plan to run the plan manually. You can also wait for the scheduled automatic trigger of the plan.
Last updated