SolarWinds Backup Help

MySQL backup

Requirements

Backup Manager offers a backup and recovery service for MySQL databases on all the supported operating systems.

Backup Manager handles MySQL versions 5.0.22, 5.1, 5.5, 5.6, 5.7 and 8.0 on Windows and Linux. On Linux, you require glibc 2.5 or higher. Backup Manager handles MySQL versions 5.0.22, 5.1 and 5.5 on MacOS.

You can add multiple MySQL instances to your backup selection (if they are installed on the same machine).

  • Backup Manager must be installed on the MySQL server that you want to back up.
  • The MySQL service must be started at the time a backup session starts.
  • The MySQL backups depend on VSS Snapshots, so VSS must be available on the system
  • Full permissions (with all privileges) are required to a MySQL database to backup the MySQL data source.
  • On Linux, glibc 2.5 or higher is required.

Types of backups

Backup Documents has 3 types of MySQL backups. They are version-dependent.

  1. Cold backups (the MySQL server is stopped for some time while the backup session runs; it is necessary that no third-party applications should be keeping the database forcibly open at that time).
  2. Warm Backups (the MySQL server is locked for write operations for some time while the backup session runs, but is still accessible for read operations).
  3. Hot backups (the MySQL server keeps functioning while a backup session is running).
MySQL version Windows Linux Mac
MySQL 5.0.22 Warm backups

Hot backup for InnoDB tables.

Warm backup for MyISAM tables.

Hot backup for InnoDB tables.

Warm backup for MyISAM tables.

MySQL 5.1
MySQL 5.5
MySQL 5.6 Currently unsupported
MySQL 5.7 Currently unsupported
MySQL 8.0 Currently unsupported

Backup through the Backup Manager

Enabling schedule-based backups

Configure backup selection

  1. Open the Backup tab in the Backup Manager
  2. Click Add next to the MySQL data source

  3. Now enter the details for an administrator login for the MySQL server

  4. Make the selection for backing up the MySQL databases

    The MySQL datasource will now show as added and editable. You can click on the name of the data source to be sure all necessary data has been included in the backup selection.

  5. If you clear your backup selection after at least one backup has been completed, you will be offered to remove all backup copies of these files from the Cloud. The action is irreversible.

Create backup schedule

It is most convenient to set up a backup schedule and let backups run automatically without your interference. You can create multiple schedules for each device, for example if you want Files and Folders to run at 9 am but you want System State and MySQL to run at 9 pm.

To create a backup schedule or edit existing schedules, go to Preferences > Schedule.

Start a one-time backup

You can initialize a backup manually at any time.

To run the backup for all data sources added for the device:

  1. Open the Backup tab
  2. Click Run backup.

The Run backup button is unavailable until at least one data source is configured for backup.

Backup through the command line

You can back up and restore data not just using the web interface but through the command line as well. This is done using the Client Tool, an executable file included into all Backup Manager installations (view primary Client Tool instruction).

Here is a sample instruction for MySQL. The current instruction is based on a Linux case. The same work flow can be used on Windows.

  1. Start your terminal emulator and move to the Backup Manager installation directory (this is where ClientTool is located).

    cd /opt/MXB/bin

  2. Configure access to the MySQL server that you want to back up.

    ./ClientTool control.mysqldb.add -name mysqldb -user root -password ********** -server-port 3306

    (Where ********** is the password)

    Here are the parameters to submit:

    • -name – assign a name to the MySQL server as it will appear in the Client Tool and Backup Manager. We support Latin letters and most punctuation marks. No slashes.
    • -user – your username for access to the MySQL server (we recommend using the root)
    • -password – your password for access to the MySQL server
    • -server-port – the port number of the MySQL server. If in doubt, check the option file on your machine (my.cnf).
  3. Add the MySQL server to your backup selection.

    ./ClientTool control.selection.modify -datasource MySql -include mysqldb

    You can make sure the MySQL server has been included into the backup selection using the control.selection.list command.

  4. Create a schedule for the MySQL data source, for example:

    ./ClientTool control.schedule.add -name MySQL_Daily -active 1 -datasources MySql -days All -time 20:00

  5. Start the backup of the MySQL data source.

    ./ClientTool control.backup.start -datasource MySql

    You can check the current status of the backup session using the control.session.list command.