Configuration

Configuration

Backupmanager provides the capability to configure Percona Xtrabackup which can perform backup and recovery of MySQL server. You can define backup settings, and customize key parameters for the workload.

Prerequisites

MySQL Database Configuration:

Linux:

  • Install and configure MySQL database

  • Start and enable MySQL service

# Start the service
systemctl start mysql/mysqld
# Enable the service
systemctl enable mysql/mysqld

MySQL User creation

We recommend you to create a separate mysql user with the following grants- BACKUP_ADMIN, PROCESS, RELOAD, LOCK TABLES, REPLICATION CLIENT

CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';
GRANT BACKUP_ADMIN, PROCESS, RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'bkpuser'@'localhost';
GRANT SELECT ON performance_schema.log_status TO 'bkpuser'@'localhost';
GRANT SELECT ON performance_schema.keyring_component_status TO bkpuser@'localhost';
GRANT SELECT ON performance_schema.replication_group_members TO bkpuser@'localhost';
FLUSH PRIVILEGES;
  • Zmanda Pro client installed and registered.

  • Backupmanager installed and login configured.

Configuration Process

Start the MySQL configuration

Open your terminal and run the following command to begin the MySQL configuration process:

backupmanager mysql configure

When prompted, enter the Device Name as registered on the server. The default value will be the hostname of the client machine you are configuring.

Note: Pressing the Delete key will exit from backupmanager.

Protected Item Configuration Menu

Once the device name is entered, you'll see the Protected Item configuration menu with the following options:

  • Edit Protected Item: Modify an existing Protected Item configuration.

  • Add Protected Item: Set up a new Protected Item configuration.

  • Exit: Exit the configuration process (this will exit backupmanager).

To create or modify a backup, choose either Edit Protected Item or Add Protected Item.

Selecting a Protected Item Configuration

When editing an existing protected item, you will be presented with a list of previously configured items.

  • Use the arrow keys to navigate through the list of protected items.

  • Details of the active selection (Name and ID) will be displayed below for verification.

  • You can select an item by pressing Enter.

Example:

  • [Back]: Returns to the previous menu.

  • [List of protected items]: Displays all available source configurations for the logged-in user.

Configuration Options

Once a protected item is selected, you'll be able to configure the following settings:

Database information

These details are required for connecting to the MySQL server during backup and recovery.

First-Time Setup

If you are configuring authentication for the first time, you'll need to provide the following details:

  • Database Username: The backup username to access the MySQL server.

  • Database Password: The corresponding password.

  • Hostname: The hostname or IP address of the MySQL server

  • Database Port: The port on which the MySQL server is running (3306 is the default)

  • Database Socket File Path: The path to the socket file used for connecting to the MySQL server

  • Data Directory: The path to directory where MySQL stores its databases, tables and other crucial files.

  • Binary Log Directory: The path to directory where MySQL stores its binary logs.

  • Configuration File Path: The path to the primary configuration file where MySQL's settings are defined.

  • Database Version: The MySQL server version (Fetched automatically)

  • Binary Log Format: The format in which changes to the MySQL server are recorded in the binary log (Fetched automatically). In case binary logging is not enabled on the server, it is preferred to have the binary logs configured to one of the following options:

    • Row format

    • Mixed format

Existing Authentication

If authentication has already been set up, you'll see the following options:

  • View Database Configuration: View current database connection details.

  • Edit Database Configuration: Modify existing credentials.

  • Test Connection: Test if the provided credentials can successfully connect to the MySQL server.

Backup Information

This step offers a range of options to configure your backup according to your strategy and specific requirements. You can customize settings such as the backup tool, method, scope, level, and more, ensuring your backup process aligns precisely with your needs.

  • Backup Tool Name: Specify the tool for performing backups; in this case, select XtraBackup.

  • Backup Method: Choose between XtraBackup Raw or Streaming backups.

  • Compatibility Check: XtraBackup and MySQL server versions will be validated for compatibility automatically—no user input is required here.

  • Parallel Thread Count: Configure the number of threads that will be spawned during backup and recovery in XtraBackup to optimize performance.

  • Backup Scope: Select whether to back up all databases, specific databases, or individual tables within a particular database.

    • If you choose specific databases - you will be given an option to choose the database from the list of available databases.

    • If you choose specific table - you will be given an option to choose tables from the databases you selected for backup.

    • While selecting a database or table hit the space bar and ensure that the item is selected.

  • Backup Level: Choose the backup level: Full or Incremental.

    • Full: This will backup the selected backup scope in its current state for each backup run.

    • Incremental (Chained differential): This will capture and backup the changes from the previous backup run.

Staging Information

In this stage, set up paths for data and binary log staging before they are transferred to Zmanda Pro.

  • Data Staging Path: Enter the path where XtraBackup stores its backups temporarily before transferring them to Zmanda Pro.

  • Binary Log Staging Path: Specify the location where MySQL server binary logs are stored temporarily before being backed up to Zmanda Pro.

Purging behavior of binary logs

Decide if you would like to purge binary logs after each backup:

  • Yes - All the binary logs that were backed up in the previous backup run will be purged after the current backup run is completed.

  • No

Storage information

In this section, specify where backup information will be stored:

  • Backup Destination: Select a storage destination to store the backup inventory and details.

Saving the Configuration

Once all the configurations are completed, make sure to save your changes. Select Save from the main configuration menu to ensure your settings are applied.

Exiting the Configuration

After saving your changes, you can exit the backupmanager utility by selecting Exit from the main menu. Be sure to save your work before exiting.

When modifying the storage vault in the storage information section, it's crucial to understand that this change will be applied to all existing scripts configured.

You can gracefully exit the backupmanager at any point during the process by pressing "Ctrl+C".

Last updated