8.1 Backing Up to Tape with Oracle Secure Backup

Tape drives are affordable, high-capacity storage devices for backup data. The MySQL Enterprise Backup product can interface with media management software (MMS) such as Oracle Secure Backup (OSB) to drive MySQL backup and restore jobs. The media management software must support Version 2 or higher of the System Backup to Tape (SBT) interface.

On the MySQL Enterprise Backup side, you run the backup job as a single-file backup using the --backup-image parameter, with the prefix sbt: in front of the filename, and optionally pass other --sbt-* parameters to the mysqlbackup command to control various aspects of the SBT processing. The --sbt-* options are listed in Section 4.1.10, “Single-File Backup Options”.

On the OSB side, you can schedule MySQL Enterprise Backup jobs by specifying a configurable command that calls mysqlbackup. You control OSB features such as encryption by defining a storage selector that applies those features to a particular backup, and passing the name of the storage selector to OSB using the MySQL Enterprise Backup parameter --sbt-database-name=storage_selector.

To back up MySQL data to tape:

To restore MySQL data from tape:

For product-specific information about Oracle Secure Backup, see the Oracle Secure Backup documentation.

Example 8.1 Sample mysqlbackup Commands Using MySQL Enterprise Backup with Oracle Secure Backup

# Uses libobk.so or ORASBT.DLL in standard places):
mysqlbackup --port=3306 --protocol=tcp --user=root --password \
  --backup-image=sbt:backup-shoeprod-2011-05-30 \
  --backup-dir=/backup backup-to-image

# Associates this backup with storage selector 'shoeprod':
mysqlbackup --port=3306 --protocol=tcp --user=root --password \
  --backup-image=sbt:backup-shoeprod-2011-05-30 \
  --sbt-database-name=shoeprod \
  --backup-dir=/backup backup-to-image

# Uses an alternative SBT library, /opt/Other-MMS.so:
mysqlbackup --port=3306 --protocol=tcp --user=root --password \
  --backup-image=sbt:backup-shoeprod-2011-05-30 \
  --sbt-lib-path=/opt/Other-MMS.so \
  --backup-dir=/backup backup-to-image