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


4.1.1.4 Work with Single-File Backups

To simplify transfer and management of backup data, you can keep each backup in a single file (the backup image). The backup-to-image option performs a backup directly to a single file, or the options here can pack an existing backup into a single file or unpack a single-file backup to a full backup directory structure. There are other options for working with single-file backups, which are explained below. For usage and examples, see Section 3.3.5, “Making a Single-File Backup”.

mysqlbackup [STD-OPTIONS]
            [--backup-image=IMAGE] [--backup-dir=PATH]
            [MESSAGE-LOGGING-OPTIONS]
            [PROGRESS-REPORT-OPTIONS]
            image-to-backup-dir

mysqlbackup [STD-OPTIONS]
            [--backup-dir=PATH] [--backup-image=IMAGE]
            [MESSAGE-LOGGING-OPTIONS]
            [PROGRESS-REPORT-OPTIONS]
            backup-dir-to-image

mysqlbackup [STD-OPTIONS]
            [--backup-image=IMAGE] [--src-entry=PATH]
            [MESSAGE-LOGGING-OPTIONS]
            list-image

mysqlbackup [STD-OPTIONS]
            [--backup-image=IMAGE] 
            [MESSAGE-LOGGING-OPTIONS]
            [PROGRESS-REPORT-OPTIONS]
            validate

mysqlbackup [STD-OPTIONS]
            [--backup-image=IMAGE]
            [--backup-dir=PATH]
            [--src-entry=PATH] [--dst-entry=PATH]
            [MESSAGE-LOGGING-OPTIONS]
            [PROGRESS-REPORT-OPTIONS]
            extract

mysqlbackup [STD-OPTIONS]
            [--backup-image=IMAGE]
            [--backup-dir=PATH]
            [MESSAGE-LOGGING-OPTIONS]
            [PROGRESS-REPORT-OPTIONS]
            copy-back-and-apply-log

  • image-to-backup-dir

    Unpacks a single-file backup to a full backup directory structure. You specify the paths to both the image file and the destination directory in which to unpack. For usage and examples, see Section 3.3.5, “Making a Single-File Backup”.

  • backup-dir-to-image

    Packs an existing backup into a single file. Specify a --backup-image value of - (standard output) to stream an existing backup directory structure to a tape device or a command that transfers the backup to another server. The --backup-image parameter is either - or an absolute path outside the backup-dir directory. For usage and examples, see Section 3.3.5, “Making a Single-File Backup”.

  • list-image

    Display the contents of a single-file backup. Lists all files and directories in the image. The --src-entry=name can be used to list a specific file or directory. If the name is a directory, all its files and subdirectories inside the image are recursively listed. For usage and examples, see Section 3.3.5, “Making a Single-File Backup”.

  • validate

    Verifies that a single-file backup is not corrupted, truncated, or otherwise damaged. This operation compares checksum values stored in the image file against the contents of the files. You might run it after transferring the image file to another system. To see the sequence of commands involved to produce and check a single-file backup, and the output for successful and unsuccessful checks, see Section C.4, “Validating a Single-File Backup Image”.

  • extract

    Unpacks an individual file or directory from a single-file backup. For troubleshooting or restoration operations that do not require the full set of backup data. The resulting file or directory goes in the current directory, or in backup-dir if specified. All files and directory contents in the image with absolute path names are extracted into the same absolute path names on the local system. For usage and examples, see Section 3.3.5, “Making a Single-File Backup”.

    The --src-entry=path option can be used for selective extraction of a single file or single directory in image. Specify the path as it appears in the image.

    The --dst-entry=path option, along with --src-entry=path option can be used to extract a single file or single directory into a user-specified file or directory respectively. If the --src-entry option is used, but --dst-entry option is omitted, then the selected file or directory is extracted to the same path in the local file system.

    The default destination for the extract is the current working directory. It can be overridden by the --backup-dir option. All the files with relative pathnames in the image are extracted to pathnames relative to the destination directory.

    If the image contains some entries with absolute pathnames, those entries are extracted to the same absolute path names even if --backup-dir option is specified. The --dst-entry option must be used to relocate an absolute pathname.

  • copy-back-and-apply-log

    In a single step, restores a single-file backup specified by the --backup-image option to a server's data directory and performs an apply-log operation to the restored data to bring them up-to-date. Comparing with a multi-step approach (which typically consists of performing the successive steps of extract, uncompress and apply-log (for restoring compressed image) or apply-log (for uncompressed image), and copy-back for restoring a single-file backup), the option makes the restoration process simpler and faster, and also saves the disk space required. See Section 4.1.1.3, “Restore an Existing Backup” for details.


User Comments
Sign Up Login You must be logged in to post a comment.