This topic describes how to use Hybrid Backup Recovery (HBR) to back up data from on-premises MySQL databases.
Preparations are completed.
Step 1: Create a file named workflow.env
To create a file named workflow.env, perform the following steps:
- Go to the installation directory of the HBR backup client and create a file named
workflow.envfile must be stored in the same directory as the
- In the
workflow.envfile, enter the username and password of the backup source in the following format:
Step 2: Configure backup scripts
You must configure two scripts: pre-backup script and post-backup script. Perform the following steps to configure the scripts:
- Pre-backup script
- Download the pre-backup script for MySQL.
- Edit and save the pre-backup script. The following table describes the parameters
in the pre-backup script for MySQL. You can set the parameters based on your requirements.
Parameter Description BackupDir The local backup path of the database. You need to specify this path as the backup source. MySQLInstallDir The installation directory of the database.
BACKUPDIRto the local backup path of the database. You need to specify this path as the backup source.
- Post-backup script
Download the post-backup script for MySQL and change the path in the script to the local backup path of MySQL.
Step 3: Create a backup workflow
To create a backup workflow, perform the following steps:
- Log on to the HBR backup client and click Create Backup Workflow in the upper-right corner.
- On the Backup Jobs/Create Backup Workflow page, click Pre-backup Script.
- In the Script Path field of the Pre-backup Script dialog box, enter the path to the pre-backup script that you specified in Step 2.Note The script path must be a maximum of 250 characters in length.
- Click Preview to confirm the content of the pre-backup script and click OK.
- On the Backup Jobs/Create Backup Workflow page, click Running Plan.
- In the Running Plan dialog box, specify the following settings and click OK.
- If you need a scheduled backup plan, click Scheduled. From the Backup Policy drop-down list, select a backup policy.
- If you need an instant backup plan, click Instant.
- On the Backup Jobs/Create Backup Workflow page, click Backup Source.
- In the Backup Source dialog box, set the following parameters and click OK.
Parameter Description Source
- Enter the path to a backup source. You can enter a maximum of eight paths. This means that you can back up data from eight directories at a time.
- The path is dedicated to workflow-based backup. The path must point to an empty directory.
- Universal Naming Convention (UNC) paths are supported.
- Separate multiple paths with carriage returns.
Use VSS for backup (Windows only)
- If the source data changes in the backup source and you need to ensure consistency between the source data and backup data, select this option.
- This feature is only available for Windows hosts.
- If you select this option, only one backup source is supported.
- Optional. On the Backup Jobs/Create Backup Workflow page, click Network Flow Control. In the Network Flow Control dialog box, specify a period in Work Hours and a maximum bandwidth in Throttling, and then click Add. Confirm the settings and click OK.Note You can use the flow control feature to throttle the bandwidth that is used for data backup during peak hours to ensure business continuity. If you do not need to throttle the bandwidth, skip this step.
- On the Backup Jobs/Create Backup Workflow page, click Post-backup Script. In the Script Path field of the Post-backup Script dialog box, enter the directory of the post-backup script that you configured in
Step 2. Click OK.Note The script path must be a maximum of 250 characters in length.
- On the Backup Jobs/Create Backup Workflow page, click Submit to start a backup job.Note
- If you need to cancel the backup job, find the running backup job on the Backup Jobs page and click Cancel next to the backup job.
- If a backup job fails, find the running job on the Backup Job page and click Retry next to the backup job. You can click the Download icon next to the number of errors to download and view the error report.