Besides the commands for creating and restoring single-file
backups (namely, backup-to-image
and
copy-back-and-apply-log
),
mysqlbackup provides a number of other
commands for you to work with single-file backups. They are
explained below.
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] [--src-entry=PATH]
[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
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 for the unpacking. For usage examples, see Section 4.3.1, “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.
backup-dir-to-image
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.1, “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=
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 examples, see Section 4.3.1, “Making a Single-File Backup”.name
NoteThe
list-image
operation can be performed on a cloud backup only if the cloud proxy supports HTTP range headers.
extract
Unpacks an individual file or directory 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
backup-dir
if specified. All files and directory contents in the image with absolute path names are extracted into the same absolute paths on the local system. For usage examples, see Section 4.3.1, “Making a Single-File Backup”.The
--src-entry=
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.path
NoteThe 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 a single file or single directory into a user-specified file or directory respectively. If thepath
--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 pathnames even if
--backup-dir
option is specified. The--dst-entry
option must be used to relocate an absolute pathname.NoteEven 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.