To simplify transfer and management of backup data, you can keep
each backup in a single file (the backup image). The
backup-to-image
command performs a
backup directly to a single file, and there are the commands for
packing an existing backup into a single file or unpacking a
single-file backup to a full backup directory structure. These
and other commands for working with single-file backups are
explained below. For usage examples, see
Section 4.3.5, “Making a Single-File Backup”.
mysqlbackup [STD-OPTIONS]
[CONNECTION-OPTIONS]
[SERVER-REPOSITORY-OPTIONS]
[BACKUP-REPOSITORY-OPTIONS]
[METADATA-OPTIONS]
[COMPRESSION-OPTIONS]
[SPECIAL-BACKUP-TYPES-OPTIONS]
[INCREMENTAL-BACKUP-OPTIONS]
[PARTIAL-BACKUP-RESTORE-OPTIONS]
[SINGLE-FILE-BACKUP-OPTIONS]
[PERFORMANCE-SCALABILITY-CAPACITY-OPTIONS]
[MESSAGE-LOGGING-OPTIONS]
[PROGRESS-REPORT-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
backup-to-image
mysqlbackup [STD-OPTIONS]
[--backup-image=IMAGE] [--backup-dir=PATH]
[MESSAGE-LOGGING-OPTIONS]
[PROGRESS-REPORT-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
image-to-backup-dir
mysqlbackup [STD-OPTIONS]
[--backup-dir=PATH] [--backup-image=IMAGE]
[MESSAGE-LOGGING-OPTIONS]
[PROGRESS-REPORT-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
backup-dir-to-image
mysqlbackup [STD-OPTIONS]
[--backup-image=IMAGE]
[MESSAGE-LOGGING-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
list-image
mysqlbackup [STD-OPTIONS]
[--backup-image=IMAGE]
[--backup-dir=PATH]
[--src-entry=PATH] [--dst-entry=PATH]
[MESSAGE-LOGGING-OPTIONS]
[PROGRESS-REPORT-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
extract
mysqlbackup [STD-OPTIONS]
[SERVER-REPOSITORY-OPTIONS]
[--backup-image=IMAGE]
[--backup-dir=PATH]
[MESSAGE-LOGGING-OPTIONS]
[PARTIAL-BACKUP-RESTORE-OPTIONS]
[PROGRESS-REPORT-OPTIONS]
[ENCRYPTION-OPTIONS]
[CLOUD-STORAGE-OPTIONS]
copy-back-and-apply-log
Unpacks a single-file backup to a full backup directory structure. You specify the paths to both the image file and the destination directory for the unpacking. For usage examples, see Section 4.3.5, “Making a Single-File Backup”.
Noteimage-to-backup-dir
only creates a raw backup directory, which is NOT ready to be restored by thecopy-back
command. To become a prepared backup, the backup directory has to go through an apply-log operation, executed either by a stand-aloneapply-log
command or as a part of acopy-back-and-apply-log
command.Packs an existing backup directory into a single file. The value for the
--backup-image
parameter should either be “-
”(stands for standard output) or an absolute path outside of thebackup-dir
directory. 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. For usage examples, see Section 4.3.5, “Making a Single-File Backup”.Display the contents of a single-file backup. Lists all files and directories in the image. For usage examples, see Section 4.3.5, “Making a Single-File Backup”.
NoteThe
list-image
operation can be performed on a cloud backup only if the cloud proxy supports HTTP range headers.Unpacks individual files or directories from a single-file backup. It is useful for troubleshooting, or for restorations that do not require the full set of backup data. The resulting file or directory goes into the current directory, or into the backup directory, if specified with
--backup-dir
; in either case, the destination directory must be empty. For usage examples, see Section 4.3.5, “Making a Single-File Backup”.The
--src-entry=
option can be used for selective extraction of files or directories whose path names in the image contain thestring
string
specified with the option.NotesSome items are always extracted from the backup; see the descriptions of
--src-entry
for details.The option is currently not supported for the extraction of cloud backups, which can only be extracted in full.
The
--dst-entry=
option, along withpath
--src-entry=
option, can be used to extract files or directories into user-specified locations; see the description for the option for details.path
The default destination for the extract is the current working directory. 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 pathnames on the local system even if the
--backup-dir
option is specified. The--dst-entry
option must be used to relocate an absolute pathname; see Example 4.14, “Dealing with Absolute Path Names”.ImportantEven with all files extracted from the backup image,
extract
only creates a raw backup directory, which is NOT ready to be restored by thecopy-back
command. To become a prepared backup, the backup directory has to go through an apply-log operation, executed either by a stand-aloneapply-log
command or as a part of acopy-back-and-apply-log
command.copy-back-and-apply-log
See description for
copy-back-and-apply-log
in Section 13.3, “Restore Operations”.