Documentation Home
MySQL Enterprise Backup 4.1 User's Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


16.9 Single-File Backup Options

These options are associated with single-file backups. You use them in combination with themysqlbackup commandsbackup-to-image,image-to-backup-dir,backup-dir-to-image,copy-back-and-apply-log,list-image, andextract. For usage examples, seeSection 4.3.1, “Making a Single-File Backup”.

  • --src-entry=STRING

    Command-Line Format--src-entry=STRING
    TypePath name

    Identifies files or directories whose pathnames contain the STRING to be extracted from a single-file backup. This option is used with theextract command. Optionally, you can also specify the--dst-entry option to extract a file or directory to a location different from its original path name.

    For example:src-entry=d1/f2 extracts only one file,f1, whilesrc-entry=d1/ extracts the entire directory tree for thed1 folder (notice the slash (/) at the end of the argument, without which all files or folders containing the stringd1 in their pathnames will be extracted).

    Default: All entries are extracted.

    Notes
    • The following items are always extracted from the backup, irrespective of the value of--src-entry (and the locations of their extraction are unaffected by the--dst-entry option):

      • The filebackup-my.cnf.

      • Adatadir folder (which only contains items matched by the--src-entry option).

      • Ameta folder, which contains the file backup_variables.txt, a log file for the extract operation, and also items matched by the--src-entry option.

    • The option is currently not supported for theextract command for cloud backups, which can only be extracted in full.

  • --dst-entry=PATH

    Command-Line Format--dst-entry=PATH
    TypePath name

    Used with single-file backups to extract a single file or directory to a user-specified path. Use of this option requires specifying the--src-entry option. This option specifies the destination path for the entry selected from the backup image by--src-entry. The entry could point to a single file or single directory. For example, to retrieve the comments file from a backup image and store it as/tmp/my-comments.txt, use a command like the following:

    mysqlbackup --src-entry=meta/comments.txt \  --dst-entry=/tmp/my-comments.txt \  --backup-image=/var/myimage.bki  extract

    Similarly, to extract all the contents of thedatadir/pets/ directory in a single-file backup as/pets-extracted/, use a command like the following:

    mysqlbackup --src-entry=datadir/pets/ \  --dst-entry=/pets-extracted/ \  --backup-image=/var/myimage.bki  extract

    The specified path is a simple path name without any wildcard expansion or regular expressions.

    In case the argument for--src-entry matches multiple files or folders, they are all extracted into a folder whose pathname, relative to the destination folder, is given by the argument of--dst-entry (unless the argument specifies an absolute path).

    Default: Original pathnames are used to create files under the destination folder.

  • --sbt-database-name=NAME

    Command-Line Format--sbt-database-name=NAME
    TypeString
    Default ValueMySQL

    For tape backups, this option can be used as a hint to the Media Management Software (MMS) for the selection of media and policies. This name has nothing to do with MySQL database names. It is a term used by the MMS. SeeSection 4.3.1.2, “Backing Up to Tape” for usage details.

  • --sbt-lib-path=PATH

    Command-Line Format--sbt-lib-path=PATH
    TypeFile name

    Path name of the SBT library used by the software that manages tape backups. If this is not specified, operating system-specific search methods are used to locatelibobk.so (UNIX) ororasbt.dll (Windows). SeeSection 4.3.1.2, “Backing Up to Tape” for usage details.

  • --sbt-environment=VAR=value,...

    Command-Line Format--sbt-environment=VAR1=value1[,VAR2=value2[,...]] SBT API provider)
    TypeString

    Passes product-specific environment variables to Oracle Secure Backup or another SBT-compliant backup management product, as an alternative to setting and unsetting environment variables before and after eachmysqlbackup invocation.

    The parameter to this option is a comma-separated list of key-value pairs, using syntax similar to that of the RMAN tool for the Oracle Database. For example,--sbt-environment=VAR1=val1,VAR2=val2,VAR3=val3.

    Consult the documentation for your backup management product to see which of its features can be controlled through environment variables. For example, the Oracle Secure Backup productdefines environment variables such asOB_MEDIA_FAMILY,OB_DEVICE, andOB_RESOURCE_WAIT_TIME. You might set such variables with themysqlbackup by specifying an option such as--sbt-environment="OB_MEDIA_FAMILY=my_mf,OB_DEVICE=my_tape".

    If the argument string contains any whitespace or special characters recognized by the command shell, enclose the entire argument string in quotation marks. To escape an equal sign or comma, use the\ character. For example,--sbt-environment="VAR1=multiple words,VAR2=<angle_brackets>,VAR3=2+2\=4".

  • --disable-manifest

    Disable generation ofmanifest files for a backup operation, which arebackup_create.xml andbackup_content.xml present in themeta subdirectory.