How to configure MySQL database backup

How to configure MySQL database backup

Overview

The database backup process in Xopero ONE can be split into two different operations:
  1. Creating a database dump using backup scripts,
  2. Performing a backup of the database dump.
The first operation is triggered through Xopero ONE using the Backup scripts feature, and the second action is simply a file-level/image-level backup plan performance done directly by Xopero ONE.
This article describes how to use Backup scripts in order to create a MySQL database dump, so it can be included in a backup plan.
See also how to create a file-level backup and image-level backup using Xopero ONE
Thanks to mysqldump tool usage Xopero ONE supports all MySQL versions that are supported by Oracle.

How to configure MySQL database backup

To configure the MySQL database environment open the Plans tab and click Add plan button and open Advanced settings.

advanced settings

Click on the Backup scripts section to expand the list of available options.

Enabling pre-backup script


Toggle the pre-backup script switch to ON and set the correct script responsible for MySQL database environment backup.


Choosing the database type



Enter the database username in the Database user field.
It is highly recommended to create a dedicated user for the database backup operations.


Setting username



Select the user password by opening the password manager, where you can add a new password or use one previously added.






Enter the arguments in the Script arguments field.

Setting scripts arguments



A scheme for MySQL script arguments is:

database output_dir mysqldump_dir
where:
  • database - database name. If you want to protect more than 1 database in one backup plan, type the names as [base1 base2 base3]. If you want to protect all databases use --all parameter instead of the database name.
  • output_dir - the directory to which the database dump is to go and also a directory that should be selected in Data to protect a section during backup plan creation.
  • mysqldump_dir - path to the mysqldump utility.

      Important! The MySQL utility is available for download at: https://dev.mysql.com/downloads/utilities/

It's recommended to mark the checkbox next to the Fail the task if the script fails option, Using it will set the backup plan status to Failed, but only in case if MySQL dump script will finish with errors.
Setting 'Fail if the script fails' checkbox




Click the Save button to apply your settings for MySQL environment backup. That's all that is needed in order to create the database dump. Remember, that this file should be now included in Data to protect section in case of file-level backup(if you want to backup only the database) or you can perform an image-level backup to protect whole drive.
See also how to create a file-level backup and image-level backup using Xopero ONE


    • Related Articles

    • How to configure PostgreSQL database backup

      In this article, you will learn how to configure the PostgreSQL database environment using Xopero ONE. In general,  a disk-level backup should protect the whole database instance, when VSS settings option is enabled. However, to ensure that data ...
    • How to configure Microsoft SQL database backup

      In this article, you will get information on how to configure the Microsoft SQL database environment using Xopero ONE. The database backup process in Xopero ONE can be split into two different operations: Creating a database dump using backup ...
    • Backup scripts

      In this article, you will find information about backup scripts. Types There are three types of backup scripts: Pre-backup - the script is executed before the backup starts. There is an extra option to wait with backup start until the script is ...
    • Backup plan overview

      In this article, you will find general information about backup plans in Xopero ONE Backup plan overview To run any task in Xopero ONE firstly you have to configure a plan - backup plan, replication plan, test-restore plan (for VMware). This article ...
    • Backup plan dashboard details

      In this article, you will get information about VMware backup plan dashboard details Backup plan dashboard details Backup plan dashboard details you will find on your backup plan list. Now hit the information button available on the right side of the ...