BackupEDGE performs MySQL Hot Backups (live backups of MySQL databases1) by creating a special Backup Domain with the information and instructions necessary to cause the mysqldump
command to send its output directly into its file input stream. The MySQL Domain is generally appended to the full system Backup Domain (or any other Domain but can also be scheduled
separately.
To set up MySQL™ backups in BackupEDGE, you should only have to run the installation program. It will ask you if you would like to include MySQL backups along with your normal filesystem backups. You will need to provide the following information (see example screen shots below):
• Connection Method (UNIX or TCP/IP Socket)
• Socket Path (usually autodetected) / Hostname and TCP/IP Port • MySQL User Name
• MySQL Password
BackupEDGE will automatically detect all databases and tables supported by one MySQL server
and display a count of tables and databases detected. It will then create a BackupEDGE Domain called mysql that includes this information. You may (and are encouraged to) review and edit this information, to see if the BackupEDGE autodetector has done something sane in your
installation. This can be done via the Domain Editor.
There are a few things to keep in mind when using BackupEDGE for MySQL backups: • By default, BackupEDGE creates one Domain for MySQL backups. The domain further
subdivides your MySQL data into what are called pieces. Each piece will ultimately
correspond to a single file on the archive (i.e., you can choose to restore one piece
independently of the next). Further, by default, each piece corresponds to a single database.
While you may change this default setup in the domain editor, it is important to realize that it exists. Note that each piece represents a call to the mysqldump utility.
• BackupEDGE cannot perform a level-2 verification of MySQL data, since it is assumed that the data in the MySQL server will change. This data will be level-1 verified, even if the backup job specifies level-2 verification. Other data, such as filesystem data, will be verified via level-2 as always.
• You should review the settings that BackupEDGE will use during backup by using the Domain Editor. To access this, enter EDGEMENU, use Setup:Enable Advanced, then Schedule: Create/Edit Domain.
• BackupEDGE can perform only Master Backups of MySQL data. Differential Backups and
Incremental Backups are not supported and MySQL backups will ignore those settings at this
time, in favor of a Master Backup. Binary log backups are not supported.
• During a disaster recovery, you can not restore MySQL backups until after you have rebooted and launched EDGEMENU.
• As mentioned earlier, by default, BackupEDGE backs up each database separately. For each, if all tables are InnoDB tables, then it will wrap the entire backup in a single transaction, else it will lock all tables to ensure consistency. In the former case, exactly what consistency
guarantees a transaction provides depends on how you have configured transaction isolation in the MySQL server.
• It is not currently possible to select a different database during restore; if you want to isolate the data for testing, use a different MySQL server.
MySQL Backup - Autodection of Connection
If the installer autodetects a connection to a MySQL database, it will offer to use this connection. Selecting it will continue to the Username and Password prompts below. Otherwise you’ll need to
choose the Connection Method and Socket Path as shown in the next two examples.
NOTE: It may be necessary, especially with InnoDB™ tables, to take some corrective action before performing the restore. This is because InnoDB tables sometimes do not restart cleanly after an unclean shutdown without additional steps. If you have backed up all tables from all databases, then you can simply remove all tables and databases and restore them all from your archive. Restores might fail until you do this, complaining that the connection to the MySQL server has been lost.
+ BackupEDGE Installation / Upgrade / Configuration ---+ | | | | | +---+ | | | MySQL(tm) Connection | | | | | | | |It appears that you use a UNIX socket | | | |/var/lib/mysql/mysql.sock to access the | | | |MySQL server. Is this right? | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (X) Yes, Use This Socket | | | | ( ) No, Let Me Pick | | | | | | | |[Next] [Exit]| | | +---+ | | | | | | | + (c) Copyright 1997-2013 by Microlite Corporation ---+
MySQL Setup - Connection Method
By default, MySQL is configured to use UNIX sockets. Change this selection only if your administrator has configured the MySQL server differently.
MySQL Setup - Socket Path
The installed will autodetect the UNIX socket path. You must generally enter a TCP/IP socket manually.
+ BackupEDGE Installation / Upgrade / Configuration ---+ | | | | | +---+ | | |Do you use a UNIX socket or TCP/IP socket | | | |to connect to MySQL(tm)? | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (X) Use UNIX Socket | | | | ( ) Use TCP/IP Socket | | | | | | | |[Next] | | | +---+ | | | | | | | + (c) Copyright 1997-2013 by Microlite Corporation ---+
+ MySQL Connection Options ---+ |Please enter the path to the UNIX socket | | | |[/var/lib/mysql/mysql.sock ]| | | | | | | | | |[Next] [Cancel]| +---+
MySQL Setup - Login Name
MySQL Setup - Password
If BackupEDGE can successfully authenticate to the MySQL server, the number of tables and databases found will be displayed. If not, an error will occur and you will be prompted to either retry or cancel the MySQL setup.