6.7.2 Online Backup

This section describes how to configure a backup profile that defines what should be backed up, where the backup should be stored, and when (the frequency) it should be backed up. With an active MySQL connection tab open, select MySQL Enterprise Backup from the Server menu to view the main Online Backup overview page in the current tab.

The following figure shows the Online Backup page that includes a full and a partial backup job configured for the current MySQL instance.

Figure 6.27 Workbench: MySQL Enterprise Backup

Content is described in the surrounding text.

Online Backup Elements

The Online Backup page is separated into three sections:

  • Backup Jobs: Used for managing backup jobs for the MySQL server. A backup job (profile) is a configuration file used to store information about what is backed up, where the backup is stored, and optionally when backups will be performed.

    Right-click a backup job to access the available actions, such as Configure Job, Delete Job, and Execute Backup. The context menu also offers two additional options:

    • Execute Backup to Image File: Saves the backup to a single file, and prompts for the file name.

    • Copy Backup Command to Clipboard: Generates a command for executing the backup, and copies it to your clipboard. You might execute this command in the shell or terminal, which looks similar to:

      /bin/mysqlbackup --defaults-file="/var/lib/meb/foo.cnf" --show-progress=stdout backup --with-timestamp
  • Backup Job Details: Displays information about the state of a specific (selected) backup job. It includes information from the Settings page, and information specific to the selected backup.

  • Recent Activity: Historical information about the backup operations performed on the server. View the backup log by right-clicking an entry and choosing View Backup Log

A progress dialog is generated for the backup operation.

Configuring a Backup Job

The following information applies to the new job operation. Configure Job is used to modify existing jobs.

The Backup Profile Name option and its associated Comments field are used to identify the profile of the backup job. Each backup job name is shown on the main page. A new backup job separates the configuration information into four subtabs: Schedule, Contents, Options, and Advanced.

Schedule Tab.  The Schedule subtab optionally sets a backup schedule for both full and incremental backups. The schedule uses the Windows Tasks Scheduler on Microsoft Windows, and a cron job on Linux and macOS. It is scheduled using the operating system user that is scheduling the backup, which is typically the MySQL user.

A full backup is slower than the incremental backup that merges with a full backup. A common scenario is to set a full backup as weekly, and an incremental backup as daily. For additional information about backup performance, see Optimizing Backup Performance.

Contents Tab.  The Contents subtab defines the schemas and tables to back up, and whether the job is a full or partial backup:

  • Full backup: All schemas and tables are backed up (see the figure that follows).

    Figure 6.28 Workbench: MySQL Enterprise Backup Configuration Showing the Contents Tab

    Content is described in the surrounding text.

  • Partial: Select the schemas and tables (objects) that you want to back up. Choose Select objects to included/excluded to open the table inclusion (and exclusion) options. For additional information about the include, exclude, and Transportable Tablespace options, see the MySQL Enterprise Backup documentation titled Partial Backup and Restore Options.

Options Tab.  The Options subtab includes settings to modify the default behavior of the backup process.

  • Backup Storage Directory: By default, the Backup Storage Directory is stored under a sub-folder using the name of the Backup Profile Name in the MySQL Backup Home Directory setting.

    A new sub-folder is created for each backup, named with its timestamp. An example subdirectory is "2016-02-22_17-49-18" where 17:49:18 is the time.

    Incremental backups are also stored in the Backup Storage Directory directory, but in their own inc/ sub-folder. Each incremental backup also creates its own timestamped sub-folder within inc/.

  • Compress Backup: Optionally compress non-incremental InnoDB backups.

  • Apply Log after backup: After a backup is completed, an apply-log operation is needed before it can be completed. This can be done after a backup, before recovery, or at any other time. Disabled by default.

  • Skip Unused Pages: Use this option to reduce the backup size by removing unused pages that are typically generated by bulk deletes. Disabled by default.


    Enabling this option increases the restoration time, because the unused pages that were removed must be added back during the recovery process.

  • Incremental Backups Using Only the Redo Log (incremental-with-redo-log-only): Specifies that an incremental backup is to be created using only the redo log.

  • Encrypt Password: Sets a password that is required to back up and restore encrypted tables.

Advanced Tab.  The Advanced subtab allows you to pass in additional MySQL Enterprise Backup options.


These additional options are not validated.

To recover backups, see Section 6.7.3, “Backup Recovery”.